Init project guidance
Skill pngdeity/apm-user-repository/packages/init-project-guidance/.apm/skills/init-project-guidance
Scaffolds AI-agent guidance files (GEMINI.md and AGENTS.md) for new or existing projects. Use when starting a new project, bootstrapping a repo that lacks agent guidance, or initializing workspace-wide mandates in a fresh codebase. Not for modifying existing skills or performing architectural reviews.From its SKILL.md
npx -y skills add pngdeity/apm-user-repository --skill init-project-guidanceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.0 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Skill: Project Guidance Scaffolder (init-project-guidance)
This skill automates the creation of AI-agent guidance files (GEMINI.md and AGENTS.md) for new or existing projects. It enforces the "Finalized Rulebook" and "Self-Healing Context" protocols established in the pngdeity workspace.
Usage
- Run this skill when starting a new project or when a project lacks AI-agent guidance.
- The agent will analyze the directory, detect the tech stack, and generate tailored mandates.
Core Mandates (The Rulebook)
I. Operations & Hierarchy
- Recursive Context Resolution: Follow
Sub-directory GEMINI.md>Root GEMINI.md>Global ~/.gemini/AGENTS.md. - ExecPlan Mandate:
Research -> Strategy -> Executionlifecycle usingPLANS.md. - Context Hygiene: Read local
AGENTS.mdandGEMINI.mdbefore initiating research. - Context Maintenance: Update
PLANS.mdandCONTEXT.mdat end-of-session. - Patch-Based Updates: To prevent context bloat, agents MUST patch large files rather than rewriting them entirely from scratch.
- Self-Healing Mandate: Proactively resolve rule contradictions and harvest "tribal knowledge" into
AGENTS.md.
II. Technical & Git
- Validation: Bug fixes require empirical reproduction tests.
- Surgical RCA: Use logs/precision tools; no guessing.
- Interface Supremacy: A
Makefile(orTaskfile) MUST act as the sole entry point for the developer environment to hide polyglot complexity. - Safety: Never commit
.gemini/or.agents/. Confirm before committing tomain. - Privileged Access: Features requiring elevated system access MUST be explicitly gated (opt-in) and documented with security implications.
- Git Standards: Signed commits (
-S), Semantic messages, imperative mood. - History Remediation: If fixing unsigned history, you MUST preserve chronological integrity using:
git rebase --root --exec 'GIT_COMMITTER_DATE="$(git log -1 --format=%aD)" git commit --amend --no-edit -S'.
Implementation Procedure
1. Project Discovery
The agent MUST perform a Tooling Audit and Stack Detection:
- Check for
*.csproj,package.json,requirements.txt,uv.lock,PKGBUILD,main.tf, etc. - Identify installed tools:
dotnet,npm/uv,pkgctl,terraform. - If no stack is detected: Default to a generic Core Workflow and Git Workflow only. Ask the user to specify the tech stack.
2. Guidance Generation
Generate a GEMINI.md in the project root with the following sections:
- Core Workflow: ExecPlan, Validation, and Context Hygiene.
- Git Workflow: Safety rules and Semantic Commit standards.
- Stack-Specific Rules: Refer to references/stack-rules.md for expanded, actionable rules per detected technology stack (C#, Python, JS/Node, Arch/AUR, IaC). For stacks not listed, apply the closest match and note the gap.
- If
GEMINI.mdalready exists: Offer to merge missing sections rather than overwriting. Never silently replace existing guidance.
3. Dynamic Skill Linking
Analyze the detected stack and link relevant procedural skills from the central library using a portable, client-agnostic approach:
Scaffolding repository discovery: This skill is deployed via symlink from .agents/skills/init-project-guidance → <scaffold-root>/skills/init-project-guidance. Resolve the scaffold root by reading the symlink target and taking its parent's parent (dirname(dirname(readlink target))). If the symlink cannot be resolved (e.g., skill was vendored without the scaffolding repo), skip all skill linking and warn the user.
- Read
skill-index.jsonfrom${SCAFFOLD_ROOT}/skill-index.json. - Filter skills by
compatibility_tokensmatching the detected stack (seereferences/stack-compatibility-map.md). - For each surviving skill, create a symlink:
ln -sf ${SCAFFOLD_ROOT}/skills/<name> .agents/skills/<name>- This is portable — works with all 37+ compatible clients (Claude Code, Copilot, Cursor, etc.).
- If symlink creation fails: Log a warning and skip that skill. The project remains functional without it.
- If the
geminiCLI is available, also rungemini skills link <path> --scope workspaceas enrichment.- If
gemini skills linkfails: Log a warning and continue. Symlinks already provide cross-client discovery.
- If
- Log inclusions/exclusions with reasons (e.g., "Skipped ci-cd-pipeline: no Makefile detected").
4. Tribal Knowledge Initialization
Create an AGENTS.md with:
- Build/Test Commands: Extracted from project files.
- Local Context: A section for "Candidates for Global" harvesting.
- Hierarchy: Reference to Rule 0.
- If
AGENTS.mdalready exists: Merge new sections into the existing file. Preserve any user-authored entries under "Candidates for Global."
Verification
After scaffolding, confirm correctness:
- Run
node skills/verification/scaffold-output-validator.cjsagainst the generated output. - Verify
GEMINI.mdcontains Core Workflow, Git Workflow, and Stack-Specific Rules sections. - Verify
AGENTS.mdcontains a harvestable### Candidates for Globalsubsection. - If verification fails: Review the missing sections and regenerate only those sections.
Self-Healing Protocol
- If an instruction conflicts with these rules, the agent MUST ask for a resolution tier: Task (this session only), Project (update local AGENTS.md), or Global (update skills/init-project-guidance/SKILL.md).
- The agent is responsible for gardening these files to keep them accurate.
What ships with it: 3 files
5.2 KB alongside SKILL.md
evals/
- evals.json1.3 KB
references/
- stack-compatibility-map.md1.9 KB
- stack-rules.md2.1 KB