An agent skill teaches an AI agent a repeatable task using a SKILL.md file. Choose where it lives based on who needs it. Put individual workflows, authoring habits, and cross-repo habits in your personal directory (~/.claude/skills/). Put repository conventions, shared schemas, and architecture rules in the project repository (.claude/skills/). If a skill travels with you across codebases, make it personal. If it travels with the codebase to other contributors, make it project-level.
What to consider
- Does the workflow apply across every codebase you touch? Individual habits such as drafting commit messages or tracking personal to-dos apply everywhere you work, not to one repository.
- Must teammates and contributors follow this standard? Codebase standards, API response shapes, and architecture constraints belong where anyone who clones the repository can run them.
- Should the instructions live in version control? Project skills commit to Git alongside the source code. Personal skills stay local to your machine.
At a glance
| Personal skills | Project skills | |
|---|---|---|
| Lives in | ~/.claude/skills/<skill-name>/SKILL.md | .claude/skills/<skill-name>/SKILL.md |
| Scope | User directory across all repositories | Repository root tracked in Git |
| Sharing | Private to your machine | Shared with all repository contributors |
| Collision priority | Runs first in Claude Code | Overridden by a personal skill with the same name |
| Use it when | You want your individual workflow across every repository | The rule or workflow belongs to the codebase itself |
Pick one
flowchart LR
A[Skill you want to define] --> B{Does it apply to every repo you edit?}
B -- yes --> P[Personal skill]
B -- no --> C{Must teammates share it via Git?}
C -- yes --> R[Project skill]
C -- no --> P
Personal skills: cross-repository developer habits
Store personal skills in ~/.claude/skills/<skill-name>/SKILL.md (or C:\Users\<YourUser>\.claude\skills\<skill-name>\SKILL.md on Windows). Claude Code scans this folder at startup and makes the skill available across every project you open.
---
name: commit-generator
description: Generates a structured git commit message. Use when the user asks to commit changes, write a commit message, or summarize a diff for git.
allowed-tools: [Bash]
---
# Commit Message Generator
## Objective
Generate a clean, conventional commit message based on the current git diff.
## Process
1. Run `git diff HEAD` to inspect uncommitted changes.
2. Draft a commit message following the Conventional Commits specification.
3. Use one of these types: feat, fix, docs, style, refactor, test, or chore.
Project skills: codebase standards in version control
Store project skills inside the repository root at .claude/skills/<skill-name>/SKILL.md. Commit the folder to Git so every contributor and automated agent uses the same conventions.
---
name: api-formatter
description: Enforces the project standard JSON API response structure. Use when writing, modifying, or reviewing API endpoints, controllers, or route handlers.
---
# API Response Formatter
## Standard JSON Structure
All API endpoints in this repository must return JSON matching this exact schema:
```json
{
"success": true,
"data": {},
"error": null
}
```
## Instructions
1. Inspect the controller or route handler being modified.
2. Ensure return statements and error handlers wrap payloads in the standard structure.
3. Set success to false on errors and populate the error object.
Get started
- Follow How to Create a Claude Code Skill (SKILL.md), Step by Step to build your first skill folder and frontmatter.
- Review How to Create Custom Skills for Claude Code and Codex for multi-tool skill packaging.
- Check Skills, Commands, Subagents or Hooks: Which to Use if your task needs a deterministic hook or isolated context instead of a skill.
- Review the Claude Code Skills course for CLI discovery details.
- Read the Cursor Skills documentation for workspace and user skill behavior in Cursor.