fimoklei/pm-ai-playbook/intent-layer

Claude Code and agent skill by fimoklei/pm-ai-playbook

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when initializing or maintaining agent-friendly repo context, setting up AGENTS.md or CLAUDE.md, adding local rules, defining verification commands, or checking whether context files are stale.

Install

npx vskill@latest install fimoklei/pm-ai-playbook/intent-layer

SKILL.md

Intent Layer

Context infrastructure that helps agents find local rules, understand ownership boundaries, verify changes, and notice when context may be stale.

Root Context Strategy

Default: use AGENTS.md as the canonical cross-agent source. Use CLAUDE.md as a thin Claude Code adapter when Claude Code is used.

Supported modes:

ModeUse whenRoot files
AGENTS.md onlyThe project wants one portable context surfaceAGENTS.md
CLAUDE.md onlyThe project is Claude-only and has no cross-agent needCLAUDE.md
AGENTS.md canonical + CLAUDE.md adapterClaude Code is used, but context should stay portableAGENTS.md plus thin CLAUDE.md

Adapter example:

markdown
@AGENTS.md
## Claude Code Specific Instructions
-Prefer editing existing files over creating new abstractions.
-Use plan mode for large refactors.
-Run local verification commands before final response.

Child AGENTS.md files in subdirectories are encouraged for complex subsystems. Root adapters should point to canonical context instead of duplicating it.

Required Root Intent Layer

Add this to the canonical context file at project root: AGENTS.md by default, or CLAUDE.md in CLAUDE-only mode. In adapter mode, add it to AGENTS.md; CLAUDE.md imports it.

markdown
## Intent Layer
**Before modifying code in a subdirectory, read its AGENTS.md first** to understand local patterns and invariants.
-**[Area 1]**: `path/to/AGENTS.md` - Brief description
-**[Area 2]**: `path/to/AGENTS.md` - Brief description
### Global Invariants
-[Invariant that applies across all areas]
-[Another global invariant]

This navigation contract is mandatory when child context nodes exist. Extend it with the project's real boundaries and global invariants; do not leave placeholder areas in finalized context.

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
scripts/check_context_staleness.sh /path/to/project
4. Decide
No root file -> Ask which supported mode to use
Existing root files -> Preserve intent; add adapter/import only if useful
Child nodes needed -> Add local AGENTS.md files with verification commands
5. Execute
Add the Required Root Intent Layer to the canonical root context file
Use references/templates.md for structure
Use references/node-examples.md for real-world patterns
Validate: canonical source is clear, READ-FIRST directive exists, every node has Verification, <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) Staleness check -> Run scripts/check_context_staleness.sh
d) Both/all

When to Create Child Nodes

SignalAction
>20k tokens in directoryCreate AGENTS.md
Responsibility shiftCreate AGENTS.md
Hidden contracts/invariantsDocument in nearest ancestor
Cross-cutting concernPlace at LCA

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

Staleness Risk Levels

scripts/check_context_staleness.sh uses git history as a review trigger, not as proof that context is wrong.

LevelMeaningAction
LOWLittle code movement since the context updateReview during normal maintenance
MEDIUMMeaningful movement or one critical-looking path changedReview verification commands and invariants
HIGHHeavy movement, many commits, or several critical-looking paths changedAudit before trusting the node
UNKNOWNGit history or context files are unavailableInspect freshness manually

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
  • scripts/check_context_staleness.sh - Flag context nodes with code movement since their last update

References:

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

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
42
Repository forks
8
7-day trend score
19

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 13 Sep 2026, a month ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/fimoklei/pm-ai-playbook/intent-layer/badge)](https://verified-skill.com/skills/fimoklei/pm-ai-playbook/intent-layer)

Something wrong with this skill or its page? Tell us.