intent-layer

crafter-station/skills · updated Apr 8, 2026

$npx skills add https://github.com/crafter-station/skills --skill intent-layer
0 commentsdiscussion
summary

Hierarchical AGENTS.md infrastructure so agents navigate codebases like senior engineers.

skill.md

Intent Layer

Hierarchical AGENTS.md infrastructure so agents navigate codebases like senior engineers.

Core Principle

Only ONE root context file. CLAUDE.md and AGENTS.md should NOT coexist at project root. Child AGENTS.md in subdirectories are encouraged for complex subsystems.

Workflow

1. Detect state
   scripts/detect_state.sh /path/to/project
   → Returns: none | partial | complete

2. Route
   none/partial → Initial setup (steps 3-5)
   complete     → Maintenance (step 6)

3. Measure [gate - show table first]
   scripts/analyze_structure.sh /path/to/project
   scripts/estimate_tokens.sh /path/to/each/source/dir

4. Decide
   No root file  → Ask: CLAUDE.md or AGENTS.md?
   Has root file → Add Intent Layer section + child nodes if needed

5. Execute
   Use references/templates.md for structure
   Use references/node-examples.md for real-world patterns
   Validate: one root, READ-FIRST directive, <4k tokens per node

6. Maintenance mode (when state=complete)
   Ask user:
   a) Audit nodes     → Use references/capture-protocol.md for SME questions
   b) Find candidates → Re-measure tokens, suggest new nodes
   c) Both

When to Create Child Nodes

Signal Action
>20k tokens in directory Create AGENTS.md
Responsibility shift Create AGENTS.md
Hidden contracts/invariants Document in nearest ancestor
Cross-cutting concern Place at LCA

Do NOT create for: every directory, simple utilities, test folders (unless complex).

Capture Questions

When documenting existing code, ask:

  1. What does this area own? What's out of scope?
  2. What invariants must never be violated?
  3. What repeatedly confuses new engineers?
  4. What patterns should always be followed?

Resources

Scripts:

  • scripts/detect_state.sh - Check Intent Layer state (none/partial/complete)
  • scripts/analyze_structure.sh - Find semantic boundaries
  • scripts/estimate_tokens.sh - Measure directory complexity

References:

  • references/templates.md - Root and child node templates
  • references/node-examples.md - Real-world examples
  • references/capture-protocol.md - SME interview protocol

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.670 reviews
  • Harper Shah· Dec 28, 2024

    Useful defaults in intent-layer — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Hana Abbas· Dec 28, 2024

    intent-layer has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Hana Chawla· Dec 28, 2024

    Registry listing for intent-layer matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Anaya Malhotra· Dec 24, 2024

    We added intent-layer from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Ganesh Mohane· Dec 4, 2024

    I recommend intent-layer for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Sofia Robinson· Dec 4, 2024

    intent-layer fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Rahul Santra· Nov 23, 2024

    intent-layer fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Advait Nasser· Nov 23, 2024

    I recommend intent-layer for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Liam Thomas· Nov 19, 2024

    intent-layer is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Liam Haddad· Nov 19, 2024

    Solid pick for teams standardizing on skills: intent-layer is focused, and the summary matches what you get after install.

showing 1-10 of 70

1 / 7