一键导入
agents-md-initialization
Create, update, or validate a project-local AGENTS.md from the shared AILI template when initializing or checking repository agent rules.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create, update, or validate a project-local AGENTS.md from the shared AILI template when initializing or checking repository agent rules.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | agents-md-initialization |
| description | Create, update, or validate a project-local AGENTS.md from the shared AILI template when initializing or checking repository agent rules. |
| metadata | {"tool":"references/agents_md.py","template":"references/agents-template.md"} |
Project AGENTS.md must be created from the bundled AILI AGENTS template.
Do not write a project AGENTS.md from scratch.
Use the bundled script:
python ~/.agents/skills/agents-md-initialization/references/agents_md.py init --project .
The script and template are distributed with this skill:
references/agents_md.pyreferences/agents-template.mdIf this skill is being run from a repository checkout rather than an installed OpenCode skill, use the repository-local path:
python .agents/skills/agents-md-initialization/references/agents_md.py init --project .
Initialize a project-local AGENTS.md:
python ~/.agents/skills/agents-md-initialization/references/agents_md.py init --project .
Update an existing generated project AGENTS.md against the current template-managed content:
python ~/.agents/skills/agents-md-initialization/references/agents_md.py update --project .
Check template compliance:
python ~/.agents/skills/agents-md-initialization/references/agents_md.py check --project .
If the global installed path is unavailable but the current repository contains this skill, replace the path prefix with .agents/skills/agents-md-initialization/.
Run init when the target project has no AGENTS.md.
If AGENTS.md already exists, do not overwrite it silently. Use update for template-managed compatibility updates, or ask before using init --strategy backup-overwrite.
🛑 STOP before overwrite or backup-overwrite: show the existing path, state that project-local content may be replaced outside managed blocks, and wait for explicit human approval.
Inspect the repository and fill only project-specific sections:
Project OverviewSetup CommandsArchitecture and Project StructureProject-Specific RulesProject-Specific Testing and Artifact PlacementLocal OverridesDo not copy broad global workflow/safety rules into the project file unless the project intentionally strengthens or specializes them.
Check CodeGraph readiness for the same target project after confirming the repository root:
codegraph status for the target projectcodegraph init -i in that repositorycodegraph init -i and then codegraph statusopenspec init as part of this flowRun check before completion.
| Trigger condition | First response | If still unresolved |
|---|---|---|
references/agents-template.md is missing or unreadable | Stop and report the expected bundled template path; do not hand-write AGENTS.md | Ask the user to restore/reinstall the skill or provide an approved template source |
references/agents_md.py is missing or not executable by Python | Stop and report the expected bundled script path and command attempted | Ask the user to restore/reinstall the skill; do not create a replacement script in the target project |
| Installed skill path is unavailable but a repository checkout is present | Use .agents/skills/agents-md-initialization/references/agents_md.py from the checkout | If neither installed nor repo-local bundled script exists, stop and ask for the AILI workflow checkout path |
Existing AGENTS.md has unrecognized local content outside managed blocks | Prefer update; summarize preserved local sections before editing | Require explicit approval before any backup-overwrite strategy |
| CodeGraph is not installed, unavailable, or user declines initialization | Report CodeGraph as skipped/unavailable/not approved | Do not block AGENTS.md completion; do not claim code-map coverage |
check fails after init/update | Report the failing output and inspect only the relevant sections | Do not claim completion until check passes or the failure is marked unresolved |
Target projects should add a lightweight check when practical:
python ~/.agents/skills/agents-md-initialization/references/agents_md.py check --project .
For Makefile projects:
check-agents:
python "$${HOME}/.agents/skills/agents-md-initialization/references/agents_md.py" check --project .
For pre-commit hooks:
#!/usr/bin/env bash
python "$HOME/.agents/skills/agents-md-initialization/references/agents_md.py" check --project .
Report:
init, update, or check was usedAGENTS.md was backed upcheck resultRun the AILI delivery lifecycle for /ideate, /define, /build, and /ship; use for idea shaping, spec/test definition, autonomous BUILD package queues, review-repair closeout, or backend routing without exposing internal stage commands.
Analyze explicit user-provided or approved evidence such as sanitized OpenCode session exports, selected transcripts, git history, implementation notes, or task records to produce a safe report-first workflow retrospective; do not claim global history access, commit raw sessions/logs, or directly edit protected harness surfaces.
Diagnose user-reported AILI/ROSE harness or workflow behavior problems without editing files; use when the user says a command, skill trigger, subagent packet, memory flow, installer, docs, or agent prompt behavior is wrong and wants to know where the issue lives and how to fix it. Do not use for normal product-code bugs; hand off approved harness modifications to harness-evolution.
Use for `/local-review` or lifecycle-triggered local review gates over worktree diffs, refs, PRs, or OpenSpec changes; owns target resolution, evidence scope, categorized review reports, verdicts, explicit repair/re-review, and no-remote-mutation boundaries without overriding OpenCode `/review`.
Use when ROSE needs context-saving subagent dispatch: single read-only scouting for noisy repository evidence, or splitting two or more independent investigation, implementation, review, testing, documentation, or security work packages across subagents without shared mutable state, overlapping edits, or sequential dependencies.
Canonical AILI requirements-grilling workflow for evidence-first requirements clarification, change-interviewer compatibility, Chinese interview packet generation, OpenSpec interview.md write-back readiness, domain-modeling, ADR gating, and grill/interview packet trigger phrases before BUILD.