project-initialization

Initialize a project with AI agent rules and documentation. Use when setting up a new repository for AI agent collaboration.

9 stars

Best use case

project-initialization is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Initialize a project with AI agent rules and documentation. Use when setting up a new repository for AI agent collaboration.

Teams using project-initialization should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/project-initialization/SKILL.md --create-dirs "https://raw.githubusercontent.com/aspiers/ai-config/main/.agents/skills/project-initialization/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/project-initialization/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How project-initialization Compares

Feature / Agentproject-initializationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Initialize a project with AI agent rules and documentation. Use when setting up a new repository for AI agent collaboration.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Project Initialization

Improve the results of running the `/init` command to create AI agent rules.

## When to Use This Skill

Use this skill when:
- Setting up a new repository for AI agent collaboration
- Neither `CLAUDE.md` nor `AGENTS.md` exists
- The `/init` command has been run but needs improvement
- You want AI agent rules to be discoverable by multiple agents

## Goal

The `/init` command creates `CLAUDE.md`, but this is only useful for Claude Code.
This skill ensures the same file contents are discoverable and readable by
multiple AI agents looking in different places.

This follows the standard documented at: https://agent-rules.org/

## Process

Perform the following steps:

1. **Check existing files**: Verify if `CLAUDE.md` and/or `AGENTS.md` exist

2. **Handle new project**: If neither file exists, first run Claude's `/init` process to generate initial content

3. **Rename if needed**: If only `CLAUDE.md` exists, rename it to `AGENTS.md`

4. **Create symlinks**: Generate symlinks so different agents can find the rules:
   - `CLAUDE.md` → points to `AGENTS.md`

5. **Fix unsafe `git push` commands**: Scan all agent instruction files
   (`AGENTS.md`, `CLAUDE.md`, and any other files they reference) for
   bare or underspecified `git push` invocations that could
   accidentally push to the wrong branch. This is a common problem
   with instructions added by tools like beads.

   **What to look for**: any `git push` that does NOT specify both
   a remote and a refspec, e.g.:
   - `git push` (no arguments at all)
   - `git push origin` (remote but no refspec)
   - `git push --force` (flags but no remote/refspec)

   **Why this matters**: a bare `git push` relies on the upstream
   tracking branch configuration. If you're on a feature branch
   that happens to track `main`, `git push` will push your feature
   commits directly to `main`. Using `git push origin HEAD` is much
   safer because it pushes the current branch to a remote branch of
   the same name, preventing accidental pushes to trunk branches.

   **How to fix**: replace bare `git push` with
   `git push origin HEAD`. Preserve any flags that were present,
   e.g. `git push --force` → `git push origin HEAD --force`.

   **Edge cases to handle**:
   - Lines inside code blocks (` ``` `) and inline code (`` ` ``)
   - Lines in checklists like `[ ] 6. git push  (push to remote)`
   - Comments after the command, e.g. `git push  # deploy`
   - Multiple occurrences in the same file
   - Do NOT modify lines that already specify both remote and
     refspec (e.g. `git push origin main`,
     `git push origin HEAD`)

6. **Verify**: Confirm the symlinks work by checking file accessibility

## Context

- Existing files: `ls CLAUDE.md AGENTS.md`

## Example Commands

```bash
# Check existing files
ls -la CLAUDE.md AGENTS.md

# Rename if needed
mv CLAUDE.md AGENTS.md

# Create symlinks
ln -s AGENTS.md CLAUDE.md

# Verify
cat CLAUDE.md
```

### Fixing unsafe `git push`

Search agent instruction files for bare `git push`:

```bash
# Find bare git push commands in agent files
grep -n 'git push' AGENTS.md CLAUDE.md .beads/context/*.md
```

Example transformations:

| Before | After |
|--------|-------|
| `git push` | `git push origin HEAD` |
| `git push --force` | `git push origin HEAD --force` |
| `git push origin` | `git push origin HEAD` |
| `[ ] 6. git push` | `[ ] 6. git push origin HEAD` |

Leave these unchanged (already safe):

| Already safe |
|--------------|
| `git push origin HEAD` |
| `git push origin main` |
| `git push origin HEAD --force` |
| `git push -u origin HEAD` |

## Result

After this process:
- `AGENTS.md` contains the authoritative AI agent rules
- `CLAUDE.md` is a symlink to `AGENTS.md`
- Multiple AI agents can discover and read the same rules
- All `git push` commands in agent instructions explicitly
  specify remote and refspec to prevent accidental pushes
  to trunk branches

Related Skills

xlsx-to-csv

9
from aspiers/ai-config

Convert XLSX spreadsheets (single or multi-sheet) to CSV files you can read and grep. Use whenever you need to process an .xlsx report from Xero, Cryptio, bank exports, or any tool that delivers spreadsheet output.

xero-mcp

9
from aspiers/ai-config

Use the Xero MCP server — obtain/refresh OAuth2 bearer tokens, troubleshoot authentication, and pick up other operational notes for working with Xero MCP tools. Use when Xero MCP tools fail with authentication errors, when the bearer token has expired (tokens last ~30 min), before starting any Xero workflow, or for general guidance on Xero MCP usage.

xero-browser

9
from aspiers/ai-config

General Xero browser automation notes. Use when automating any Xero page with agent-browser — covers non-standard UI patterns, waiting, and dropdown menus.

test-running

9
from aspiers/ai-config

Run tests according to repository guidelines. Use after linting passes, before staging changes.

task-orchestration

9
from aspiers/ai-config

Orchestrate the complete development workflow for implementing sub-tasks from a task list. Use for end-to-end feature implementation with quality controls.

task-implementation

9
from aspiers/ai-config

Implement a single sub-task from a task list. Use when working on feature development with existing task lists.

task-generation

9
from aspiers/ai-config

Generate a detailed task list from a PRP. Use after a PRP is created and ready for implementation planning.

subagent-authoring

9
from aspiers/ai-config

Create subagent definitions for Claude Code and OpenCode that delegate to skills. Use when creating new subagents or refactoring existing ones to follow the delegation pattern.

slow-command-running

9
from aspiers/ai-config

Pipe long running commands through tee(1) to allow watching output and repeated analyses without rerunning

skill-authoring

9
from aspiers/ai-config

Create and maintain Claude Code skills following Anthropic best practices. Use when building new skills, refactoring existing ones, or ensuring skills follow official guidelines for structure, naming, progressive disclosure, and testing.

safe-rm

9
from aspiers/ai-config

Safely delete files / directories without asking for permission

prp-generation

9
from aspiers/ai-config

Generate a Product Requirements Prompt (PRP) from a feature description. Use when starting work on a new feature.