intent-layer by crafter-station/skills
npx skills add https://github.com/crafter-station/skills --skill intent-layer分层式 AGENTS.md 基础设施,让智能体像资深工程师一样浏览代码库。
只有一个根上下文文件。 项目根目录下不应同时存在 CLAUDE.md 和 AGENTS.md。鼓励在子目录中创建子级 AGENTS.md 以处理复杂的子系统。
1. 检测状态
scripts/detect_state.sh /path/to/project
→ 返回:none | partial | complete
2. 路由
none/partial → 初始设置(步骤 3-5)
complete → 维护(步骤 6)
3. 测量 [关卡 - 先显示表格]
scripts/analyze_structure.sh /path/to/project
scripts/estimate_tokens.sh /path/to/each/source/dir
4. 决策
无根文件 → 询问:CLAUDE.md 还是 AGENTS.md?
有根文件 → 添加意图层部分 + 必要时添加子节点
5. 执行
使用 references/templates.md 获取结构
使用 references/node-examples.md 获取真实世界模式
验证:一个根节点,READ-FIRST 指令,每个节点 <4k tokens
6. 维护模式(当状态=complete时)
询问用户:
a) 审计节点 → 使用 references/capture-protocol.md 进行领域专家提问
b) 寻找候选节点 → 重新测量 tokens,建议新节点
c) 两者都做
| 信号 | 操作 |
|---|---|
| 目录中 >20k tokens | 创建 AGENTS.md |
| 职责转移 | 创建 AGENTS.md |
| 隐藏的契约/不变量 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 记录在最近的祖先节点中 |
| 横切关注点 | 放置在最近公共祖先处 |
不要为以下情况创建:每个目录、简单工具、测试文件夹(除非很复杂)。
在记录现有代码时,询问:
脚本:
scripts/detect_state.sh - 检查意图层状态(none/partial/complete)scripts/analyze_structure.sh - 查找语义边界scripts/estimate_tokens.sh - 测量目录复杂度参考:
references/templates.md - 根节点和子节点模板references/node-examples.md - 真实世界示例references/capture-protocol.md - 领域专家访谈协议每周安装量
115
代码仓库
GitHub 星标数
36
首次出现
2026年1月19日
安全审计
安装于
claude-code91
gemini-cli87
codex83
opencode83
cursor70
github-copilot69
Hierarchical AGENTS.md infrastructure so agents navigate codebases like senior engineers.
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.
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
| 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).
When documenting existing code, ask:
Scripts:
scripts/detect_state.sh - Check Intent Layer state (none/partial/complete)scripts/analyze_structure.sh - Find semantic boundariesscripts/estimate_tokens.sh - Measure directory complexityReferences:
references/templates.md - Root and child node templatesreferences/node-examples.md - Real-world examplesreferences/capture-protocol.md - SME interview protocolWeekly Installs
115
Repository
GitHub Stars
36
First Seen
Jan 19, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code91
gemini-cli87
codex83
opencode83
cursor70
github-copilot69
AI 代码实施计划编写技能 | 自动化开发任务分解与 TDD 流程规划工具
50,900 周安装
Django架构模式与最佳实践:生产级项目结构、DRF API设计和可扩展应用开发指南
2,400 周安装
Tushare金融数据Skill:Python获取中国股市/基金/宏观经济数据API接口
2,400 周安装
查询地址信息技能 - 查询链上钱包资产、代币价格和持仓情况 | Binance Skills Hub
2,500 周安装
Meme Rush - Binance Launchpad 代币追踪与AI热点发现工具 | 狙击新币与迁移监控
2,400 周安装
Python设计模式与最佳实践指南 - 构建健壮高效代码
2,500 周安装
n8n节点配置指南:操作感知与渐进式披露最佳实践
2,500 周安装