cognitive-init

Generate AGENTS.md and CLAUDE.md from repository facts with five-element structure.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/sfio/cognitive-init-skill --skill cognitive-init
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cognitive-init
Source: https://github.com/sfio/cognitive-init-skill/tree/main/skills/cognitive-init
Command: npx skills add https://github.com/sfio/cognitive-init-skill --skill cognitive-init

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates AGENTS.md and CLAUDE.md from repository facts, enabling a clear separation of factual maps and cognitive design lenses for AI projects.

Core Features & Use Cases

  • Generate AGENTS.md from project facts (What is) and CLAUDE.md (How to think) to visualize relationships between facts and lens.
  • Ensure CLAUDE.md adopts a 5-element structure (Premise, Situation, Purpose, Motive, Constraint) and imports AGENTS.md at the top for context.
  • Support phase-driven workflows and migration guidance for existing CLAUDE.md to the AGENTS/CLAUDE structure.

Quick Start

Review the generated drafts and confirm to write the files.

Frequently Asked Questions about cognitive-init

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I auto-generate CLAUDE.md and AGENTS.md from my repository facts?

To auto-generate CLAUDE.md and AGENTS.md, the Skill extracts factual maps from your repository and applies a cognitive-design lens to draft both files, separating project facts from AI thinking guidelines. You review the drafts and confirm to write the files.

What is the five-element structure for CLAUDE.md documentation?

The five-element structure for CLAUDE.md consists of Premise, Situation, Purpose, Motive, and Constraint. This frontmatter-driven structure establishes a cognitive-design lens that defines how AI agents should think about and approach the project.

Can I migrate an existing CLAUDE.md to the AGENTS.md and CLAUDE.md structure?

Yes, you can migrate an existing CLAUDE.md to the AGENTS.md and CLAUDE.md structure. The Skill provides specific gating and migration guidance to safely transition your current documentation into the phase-ordered factual map and cognitive lens format.

Do I need to manually separate project facts from AI agent instructions in my documentation?

You do not need to manually separate project facts from AI agent instructions. The Skill visualizes the relationship between facts and lens by generating AGENTS.md for what is and CLAUDE.md for how to think, importing AGENTS.md at the top for context.

How does phase-ordered documentation improve AI project governance?

Phase-ordered documentation improves AI project governance by applying a cognitive-design lens that enforces structured frontmatter and specific constraints. This ensures AI agents operate within safe, clearly defined boundaries across different project phases.

What's the best way to establish a cognitive-design lens for AI agents in a codebase?

The best way to establish a cognitive-design lens is to extract factual repository maps and generate a CLAUDE.md file with the five required elements. This enables safe, interactive drafting of agent guidelines directly from your codebase facts.