<< All versions

Skill v1.0.0

currentLLM-judged scan90/100
cssmagic/agent-config/init-project-agent-skills
──Details
PublishedOctober 21, 2026 at 11:27 PM
Content Hashsha256:50f70b5b24804432...
Git SHAfeececc42f8f
──Files
Files (1 file, 3.1 KB)
SKILL.md3.1 KBactive
SKILL.md · 98 lines · 3.1 KB

version: "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/.gitkeep when 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:

bash
python3 scripts/init_project_agent_skills.py

When the project directory is explicit:

bash
python3 scripts/init_project_agent_skills.py "/absolute/path/to/project"

To preview changes without modifying files:

bash
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 .gitkeep creation.
  • Existing correct .claude/skills symlink: keep it unchanged.
  • Existing .claude/skills symlink pointing elsewhere: update it and report the previous target.
  • Existing .claude/skills regular 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.
  • .agents or .claude exists as a non-directory or symlink.
  • .agents/skills exists but is not a real directory.
  • .agents/skills/.gitkeep exists but is not a regular file.
  • .claude/skills exists 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
  • .gitkeep result: 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
All versions