wenjinnn/.dotfiles/init-pi-agentsmd
Claude Code and agent skill by wenjinnn/.dotfiles
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Generate a pi-flavored AGENTS.md for the current project — the pi equivalent of Claude Code's /init. Scans repo structure, build/test/lint commands and conventions, then appends a Pi Agent Notes section describing this machine's pi capabilities (web access, subagents, memory, context-mode KB, pi-lens diagnostics, goal/loop tracking, permission guardrails, telegram, nixos MCP). Use when the user asks to init/initialize a project for AI agents, generate an AGENTS.md, or says "/init".
Install
npx vskill@latest install wenjinnn/.dotfiles/init-pi-agentsmdSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Init Pi AGENTS.md
Scaffold an AGENTS.md for the current repository, tuned for the pi coding agent running on this machine. Unlike a generic /init (which only extracts build commands), this one also documents the pi capabilities available in the environment, so future pi sessions know what they can reach for.
When to Use
- User asks to "init this project" / "generate AGENTS.md" / "add agent context" / "/init"
- A freshly cloned repo needs agent context for pi sessions
- Existing AGENTS.md is stale and the user wants it refreshed
Prerequisites
- Working directory: the repository root (or run from anywhere inside the repo — resolve with
git rev-parse --show-toplevel) - Existing AGENTS.md (if any) must be merged, not blindly replaced
Procedure
Step 1: Locate the project root
Step 2: Inventory the repo
List top-level entries and look for:
- Manifests / build files:
README*,package.json(+ lockfile),pyproject.toml,Cargo.toml,go.mod,flake.nix,Makefile,justfile,Taskfile,docker-compose* - CI:
.github/workflows/,.gitlab-ci.yml,azure-pipelines.yml— the real build/test/lint commands live here - Config / style:
.editorconfig,.prettierrc*,.eslintrc*,ruff.toml,clang-format,biome.json - Conventions:
CONTRIBUTING.md, commitlint /.gitmessage, CHANGELOG policy, branch/PR rules from CI checks - Security-relevant: secret handling (sops,
.env, vault), destructive commands (migrations), pre-commit hooks
Step 3: Extract commands from real configs — never invent
package.jsonscripts →npm run build|test|lint- Makefile / justfile targets → read the actual target list
- CI workflow steps → the exact commands the project runs in production
- README quickstart → dev/run commands
If a command cannot be found anywhere, write unknown — ask the user rather than guessing.
Step 4: Detect conventions
- Code style from formatter/linter configs (spaces vs tabs, trailing commas, max line length, naming)
- Commit style: conventional commits? (check commitlint config,
.gitmessage, orgit log --onelinehistory) - Branch / PR requirements if enforced by CI
Step 5: Write the AGENTS.md
Match the file language to the project (Chinese README → Chinese AGENTS.md). Structure, ≤60 lines, every line must earn its place:
Step 5b: Append the Pi Environment block
This is what makes it "pi-flavored" — copy the following block into the ## Pi Agent Notes section, trimmed to the capabilities that matter for the project (drop irrelevant lines, keep the section tight):
Step 6: Handle an existing AGENTS.md
- Read it first. Merge new findings into it — preserve custom instructions.
- Ask the user before wholesale overwriting a large or hand-maintained file.
Step 7: Finish
- Tell the user the file was written, and that pi needs
/reload(or restart) to pick it up. - Note the same AGENTS.md is read by other harnesses (Claude Code, Cursor, Copilot), so one file serves everywhere.
Pitfalls
- Never copy the README verbatim — AGENTS.md is agent context, not documentation. Extract commands and conventions only.
- Never fabricate commands — every command must be observed in a config/CI file, or explicitly flagged unknown.
- No secrets — no tokens, keys, or machine-specific paths.
- Keep it ≤60 lines — this file is injected into every pi session; deep per-task detail belongs in skills, not here.
- Don't add aspirational process — commit/branch rules belong only if CI enforces them.
- Don't clobber — existing AGENTS.md gets merged, not replaced, unless the user asks for a rewrite.
- The Pi Agent Notes block is a default, not doctrine — trim it to what the project actually needs.
Verification
AGENTS.mdexists at the project root.- Every listed command was observed in a real config/CI file (spot-check two actually run).
- No secrets/tokens in the file (grep for
key|secret|tokenpatterns). - File ≤60 lines and every section has content.
- Existing instructions were preserved (if an AGENTS.md already existed).
/reloador a new pi session loads the file (visible in the startup header or/context).
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmodules/home-manager/llm/skills/init-pi-agentsmd/SKILL.md
Popularity
- Repository stars
- 114
- Repository forks
- 9
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
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
[](https://verified-skill.com/skills/wenjinnn/.dotfiles/init-pi-agentsmd)