Skill v1.0.0
currentLLM-judged scan90/100version: "1.0.0" name: init-project-agent-skills description: "Use when initializing project-level agent skill directories, especially when a repository needs .agents/skills, .agents/skills/.gitkeep, and .claude/skills linked to the shared project skills directory."
Init Project Agent Skills
Purpose
Initialize project-level agent skills so Codex, Cursor, and Claude Code can share one repository-local skill directory.
The target state is:
<project>/.agents/skills/<project>/.agents/skills/.gitkeepwhen the skills directory is empty<project>/.claude/skills -> ../.agents/skills
The Claude Code path uses a relative symlink so the project can move without breaking the link.
Required Input
Each run needs a project directory.
Choose the project directory in this order:
- If the user provides a directory when invoking the skill, use it.
- Otherwise, use the current working directory.
Workflow
Run the bundled script from this skill directory. When the current working directory is the project directory, the project argument may be omitted:
python3 scripts/init_project_agent_skills.py
When the project directory is explicit:
python3 scripts/init_project_agent_skills.py "/absolute/path/to/project"
To preview changes without modifying files:
python3 scripts/init_project_agent_skills.py --dry-run "/absolute/path/to/project"
Defaults
- Missing
.agents/and.claude/directories: create them. - Missing
.agents/skills/: create it. - Missing
.agents/skills/.gitkeep: create it only when.agents/skills/is empty, so Git can track the otherwise-empty skills directory. - Existing files or directories inside
.agents/skills/: skip.gitkeepcreation. - Existing correct
.claude/skillssymlink: keep it unchanged. - Existing
.claude/skillssymlink pointing elsewhere: update it and report the previous target. - Existing
.claude/skillsregular directory, regular file, or special file: refuse to overwrite and stop.
Never delete existing project skills.
Conflict Handling
The script runs preflight checks before creating or updating anything. If a conflict is found, it reports all known conflicts and exits without partial changes.
It refuses to proceed when:
- The project path does not exist.
- The project path is not a directory.
.agentsor.claudeexists as a non-directory or symlink..agents/skillsexists but is not a real directory..agents/skills/.gitkeepexists but is not a regular file..claude/skillsexists and is not a symlink.
If .claude/skills already exists as a directory, ask the user to manually move any useful skills into .agents/skills/, remove the old directory, and re-run the script. This avoids accidental data loss.
Reporting
Summarize with:
- project directory
- source skills directory
- source result:
created_directory,unchanged, or dry-run equivalent .gitkeepresult:created_file,unchanged,skipped_non_empty_directory, or dry-run equivalent- target path
- target result:
created_symlink,updated_symlink,unchanged, or dry-run equivalent - previous symlink target when the target was updated