meta-42cog

This skill should be used when initializing a new project with Cognitive Agile methodology. It automatically generates real.md (reality constraints) and cog.md (cognitive model) by scanning the project directory and identifying key patterns.

16 stars

Best use case

meta-42cog is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

This skill should be used when initializing a new project with Cognitive Agile methodology. It automatically generates real.md (reality constraints) and cog.md (cognitive model) by scanning the project directory and identifying key patterns.

Teams using meta-42cog should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/meta-42cog/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/meta-42cog/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/meta-42cog/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How meta-42cog Compares

Feature / Agentmeta-42cogStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

This skill should be used when initializing a new project with Cognitive Agile methodology. It automatically generates real.md (reality constraints) and cog.md (cognitive model) by scanning the project directory and identifying key patterns.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Meta Skill - Cognitive Agile Foundation Generator

## Overview

This is the **meta skill** for Cognitive Agile methodology (认知敏捷法). It generates the two foundational documents that all other skills depend on:

1. **real.md** - Reality Constraints Document
2. **cog.md** - Cognitive Model Document

These documents follow the RCSW workflow:
```
Real → Cog → Spec → Work
```

## When to Use This Skill

- Starting a new project with Cognitive Agile methodology
- When real.md or cog.md is missing and another skill needs them
- When project structure has significantly changed and foundation documents need regeneration
- When onboarding a project to Cognitive Agile workflow

## Core Principles

This skill follows the **Supreme Principle** of Cognitive Agile:

> **Accelerate the Hybrid Intelligence Loop** — All designs should be evaluated by whether they accelerate the human-AI collaboration cycle.

### Four Specific Principles

1. **Independent Operation**: Let AI work autonomously
2. **Focus on Output**: Care about final results, not intermediate steps
3. **Consider Exceptions**: Handle cases AI might not anticipate
4. **Continuous Reflection**: Generate more skills from experience

## Process

### Phase 1: Project Scanning

Scan the project directory to identify:

**Technical Stack Detection:**
- `package.json` → Node.js/JavaScript project, dependencies
- `requirements.txt` / `pyproject.toml` → Python project
- `Cargo.toml` → Rust project
- `go.mod` → Go project
- `*.csproj` → .NET project

**Framework Detection:**
- Next.js, React, Vue, Angular (frontend)
- Express, FastAPI, Django, Rails (backend)
- Drizzle, Prisma, TypeORM (ORM)

**Database Detection:**
- Schema files, migration files
- Connection strings in environment files

**Sensitive Data Patterns:**
- User credentials (passwords, tokens)
- API keys
- Personal information (email, phone, address)
- Payment information

### Phase 2: Generate real.md

> **Recommendation**: Most projects should use the **simple format**. Only use the detailed format when you need to distinguish required/optional constraints or provide detailed explanations.

**Template Files**:
- Simple format (recommended): [real-template-simple.md](./template/real-template-simple.md)
- Detailed format: [real-template-detailed.md](./template/real-template-detailed.md)

**Example Files**:
- Simple format examples: [real-example-simple.md](./example/real-example-simple.md)
- Detailed format example: [real-example-detailed.md](./example/real-example-detailed.md)

<real-md-template>

**Format**: Markdown + XML semantic closure tags

**Structure**:
```markdown
# [Project Name] - Reality Constraints Document

<meta>
  <document-id>[project]-real</document-id>
  <version>1.0.0</version>
  <project>[Project Name]</project>
  <type>Reality Constraints</type>
  <created>[Date]</created>
</meta>

## Document Purpose

[Brief description of what this document defines]

<constraints>

## Required Constraints (Maximum 4)

<constraint required="true" id="C1">
<title>[Constraint Title]</title>
<description>[What must be done or avoided]</description>
<rationale>[Why this constraint exists]</rationale>
<violation-consequence>[What happens if violated]</violation-consequence>
</constraint>

[... up to 4 required constraints]

## Optional Constraints (Maximum 3)

<constraint required="false" id="C5">
<title>[Constraint Title]</title>
<description>[What should be done or avoided]</description>
<rationale>[Why this is recommended]</rationale>
</constraint>

[... up to 3 optional constraints]

</constraints>

## Technical Environment

<environment>
<stack>
  [Technology stack details]
</stack>
</environment>

## Constraint Checklist

[Checkboxes for verification]
```

</real-md-template>

**Constraint Identification Guidelines:**

| Priority | Type | Examples |
|----------|------|----------|
| Required | Security | Password hashing, API key encryption, data ownership validation |
| Required | Data Integrity | First-user-admin rule, unique constraints |
| Required | Compliance | GDPR, data residency, audit logging |
| Optional | UX Simplification | Avatar generation, file type limits |
| Optional | Performance | Caching rules, rate limits |

**Key Rule**: Focus on constraints that **AI might not anticipate** but would cause **real-world damage** if violated.

### Phase 3: Generate cog.md

> **Recommendation**: Most projects should use the **simple format**. Only use the detailed format when you need more detailed attribute definitions and complex relationships.

**Template Files**:
- Simple format (recommended): [cog-template-simple.md](./template/cog-template-simple.md)
- Detailed format: [cog-template-detailed.md](./template/cog-template-detailed.md)

**Example Files**:
- Simple format example: [cog-example-simple.md](./example/cog-example-simple.md)
- Detailed format example: [cog-example-detailed.md](./example/cog-example-detailed.md)

<cog-md-template>

**Format**: Markdown + XML semantic closure tags

**Core Framework**: **Agents + Information + Context**

**Structure**:
```markdown
# [Project Name] - Cognitive Model Document

<meta>
  <document-id>[project]-cog</document-id>
  <version>1.0.0</version>
  <project>[Project Name]</project>
  <type>Cognitive Model</type>
  <created>[Date]</created>
  <depends>real.md</depends>
</meta>

## Document Purpose

[Brief description based on "Agents + Information + Context" framework]

---

## 1. Agents

<agents>

### 1.1 Human Agents

<agent type="human" id="A1">
<name>[Agent Name]</name>
<identifier>[How to uniquely identify - UUID, email, etc.]</identifier>
<classification>
  <by-[criterion]>[Category 1] | [Category 2]</by-[criterion]>
</classification>
<capabilities>[What they can do]</capabilities>
<goals>[What they want to achieve]</goals>
</agent>

### 1.2 AI Agents

<agent type="ai" id="A2">
<name>[AI Agent Name]</name>
<identifier>[How to identify - provider + model]</identifier>
<classification>
  <by-[criterion]>[Categories]</by-[criterion]>
</classification>
<interaction-pattern>[Input/Output patterns]</interaction-pattern>
</agent>

</agents>

---

## 2. Information

<information>

### 2.1 Core Entities

<entity id="E1">
<name>[Entity Name]</name>
<unique-code>[How to uniquely identify]</unique-code>
<classification>
  <by-[criterion]>[Categories]</by-[criterion]>
</classification>
<attributes>[Key attributes]</attributes>
<relations>[Relationships: 1:1, 1:N, N:N]</relations>
</entity>

### 2.2 Information Flow

<information-flow>
<flow id="F1" name="[Flow Name]">
  [Agent] → [Action] → [System] → [Response] → [Agent]
</flow>
</information-flow>

</information>

---

## 3. Context

<context>

### 3.1 Application Context
[Web app, mobile app, CLI tool, etc.]

### 3.2 Technical Context
[Architecture, protocols, security measures]

### 3.3 User Experience Context
[Emotional goals, interaction style]

</context>

---

## 4. Weight Matrix

<weights>
[Importance weights for entities and interactions]
</weights>

---

## 5. Verification Checklist

[Checkboxes for validation]
```

</cog-md-template>

**Entity Identification Guidelines:**

For each entity, define:
1. **Unique Code**: How AI can locate and identify it (UUID, slug, compound key)
2. **Classification**: Human-defined categories (AI tends to classify arbitrarily)

### Phase 4: Validation

After generating both documents:

1. **Cross-reference Check**:
   - All entities in cog.md should respect constraints in real.md
   - Security-sensitive entities should have corresponding constraints

2. **Completeness Check**:
   - real.md: 4-7 constraints total
   - cog.md: All major entities identified with unique codes and classifications

3. **Format Check**:
   - XML tags are properly closed
   - Markdown structure is clean
   - No code fences around constraint/entity definitions

## Output

Generate two files in the project's cognitive agile directory:

```
.42cog/           (or project-specific location)
├── real.md       # Reality Constraints
└── cog.md        # Cognitive Model
```

## Quality Checklist

- [ ] real.md has 4 required constraints maximum
- [ ] real.md has 3 optional constraints maximum
- [ ] All constraints focus on AI-unaware, real-world-damaging issues
- [ ] cog.md follows "Agents + Information + Context" framework
- [ ] All entities have unique codes defined
- [ ] All entities have human-defined classifications
- [ ] XML semantic closure tags are properly used
- [ ] Documents are concise (AI context window is limited)

## Integration with Other Skills

| Skill | Relationship |
|-------|--------------|
| All 01-11 skills | Output: real.md and cog.md are prerequisites |
| product-requirements | Depends on cog.md for entity understanding |
| database-design | Depends on cog.md for entity relationships |
| coding | Depends on real.md for security constraints |

## Trigger Conditions

This skill is automatically invoked when:
1. Any other skill detects missing real.md or cog.md
2. User explicitly requests foundation document generation
3. Project is being initialized with Cognitive Agile methodology

Related Skills

metasploit-framework

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to "use Metasploit for penetration testing", "exploit vulnerabilities with msfconsole", "create payloads with msfvenom", "perform post-exp...

metalsmith-website-skills

16
from diegosouzapw/awesome-omni-skill

Build static websites using Metalsmith's component-based architecture. Triggers on phrases like "build me a website", "create a landing page", "help me make a site". Includes JavaScript and CSS development standards.

Meta Dispatcher & Task Orchestrator

16
from diegosouzapw/awesome-omni-skill

PRD 驱动的任务调度与技能管理专家。接收完整 PRD/需求文档,负责拆解业务、选择技术栈、路由到合适的专业 Skill,并维护从方案到落地的全流程。

bio-metagenomics-abundance

16
from diegosouzapw/awesome-omni-skill

Species abundance estimation using Bracken with Kraken2 output. Redistributes reads from higher taxonomic levels to species for more accurate estimates. Use when accurate species-level abundances are needed from Kraken2 classification output.

02-meta-skill-forge-150

16
from diegosouzapw/awesome-omni-skill

[02] META. Create new skills when existing ones don't cover the task. Analyze unique requirements, build framework (Frame → Research → Plan → Execute), integrate risks, and declare new skill. Use when facing novel problems that existing skills can't address.

repo-metadata

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to "update repo description", "improve repository description", "generate topics", "add labels to repo", "optimize github metadata", "make repo more discoverable", "improve repo SEO", "update project description", or needs to create engaging repository descriptions and topics that improve discoverability. Analyzes project files to generate optimized GitHub metadata.

artifact-metadata

16
from diegosouzapw/awesome-omni-skill

Manage artifact metadata, versioning, ownership, and history tracking. Use when relevant to the task.

analyze-silver-miner-metal-ratio

16
from diegosouzapw/awesome-omni-skill

以「銀礦股價格 ÷ 白銀價格」的相對比率衡量礦業股板塊相對於金屬本體的估值區間(偏貴/偏便宜),並用歷史分位數與類比區間推導「底部/頂部」訊號與情境推演。

01-meta-chain-of-skills-150

16
from diegosouzapw/awesome-omni-skill

[01] META. Сканирует доступные skills, создает план выполнения и идет шаг за шагом с подтверждением каждого этапа. Triggers on complex tasks, multi-step work, or when structured execution is needed.

00-meta-chain-flow-150

16
from diegosouzapw/awesome-omni-skill

[00] META. Orchestrate skills into dynamic chains for complex tasks. Analyzes the task, discovers available skills, builds an optimal chain, explains why each skill is needed, and executes step-by-step with user confirmation. Use for any complex task requiring multiple thinking/research/analysis steps. Triggers on "plan this", "how to approach", "what's the strategy", "build a plan", or any multi-step problem requiring skill orchestration.

bio-metagenomics-amr-detection

16
from diegosouzapw/awesome-omni-skill

Detect antimicrobial resistance genes using AMRFinderPlus, ResFinder, and CARD. Screen isolates and metagenomes for resistance determinants. Use when characterizing resistance profiles in clinical isolates, surveillance samples, or metagenomic data.

seo-meta-optimizer

16
from diegosouzapw/awesome-omni-skill

Creates optimized meta titles, descriptions, and URL suggestions based on character limits and best practices. Generates compelling, keyword-rich metadata. Use PROACTIVELY for new content.