Initial agent skills setup
Common skills shared across Claude Code, Codex, and Antigravity, plus per-agent extras. sync.sh deploys to each tool's config path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
30
agents_extra.md
Normal file
30
agents_extra.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Codex & Antigravity — Agent-Specific Skills
|
||||
|
||||
## Skill Discovery
|
||||
|
||||
- Skills in `~/.agents/skills/[name]/SKILL.md` are auto-discovered.
|
||||
- Each skill directory can include optional `scripts/`, `references/`, and `assets/` subdirectories.
|
||||
- Skills can be scoped: user (`~/.agents/skills`), repo (`.agents/skills`), or system (`/etc/codex/skills`).
|
||||
|
||||
## SKILL.md Format
|
||||
|
||||
- Always include YAML frontmatter with `name` and `description` fields.
|
||||
- `description` should clearly state when and how the skill applies.
|
||||
- Example:
|
||||
```yaml
|
||||
---
|
||||
name: my-skills
|
||||
description: Personal coding conventions and preferences
|
||||
---
|
||||
```
|
||||
|
||||
## Task Execution
|
||||
|
||||
- Prefer running tasks in isolated environments when available.
|
||||
- Use `agents/openai.yaml` to configure agent-specific behavior per skill directory.
|
||||
- Leverage built-in Codex skills before writing custom ones.
|
||||
|
||||
## Project Awareness
|
||||
|
||||
- Read `.agents/skills` at repo root for project-specific overrides.
|
||||
- Project-level skills take precedence over user-level skills.
|
||||
30
claude_extra.md
Normal file
30
claude_extra.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# Claude Code — Agent-Specific Skills
|
||||
|
||||
## CLAUDE.md & Project Context
|
||||
|
||||
- Always check for `CLAUDE.md` at project root before starting tasks.
|
||||
- Instructions in `CLAUDE.md` override default behavior — follow them exactly.
|
||||
- Use `@path/to/file` syntax to import additional context files inline.
|
||||
|
||||
## Tool Use
|
||||
|
||||
- Prefer dedicated tools (Read, Edit, Write) over Bash when one fits.
|
||||
- Run independent tool calls in parallel to maximize efficiency.
|
||||
- Reserve Bash for shell-only operations.
|
||||
|
||||
## Memory
|
||||
|
||||
- Save non-obvious user preferences and feedback to `/root/.claude/projects/` memory files.
|
||||
- Do not save things derivable from code, git history, or documentation.
|
||||
- Verify memory against current file state before acting on it — memories can go stale.
|
||||
|
||||
## MCP & Hooks
|
||||
|
||||
- MCP servers extend tool capabilities — check available MCP tools before falling back to generic approaches.
|
||||
- Hooks in `settings.json` execute automatically on events; use them for automated behaviors.
|
||||
- Never skip hooks (`--no-verify`) unless the user explicitly requests it.
|
||||
|
||||
## Permissions
|
||||
|
||||
- For destructive or hard-to-reverse actions (force push, rm -rf, drop table), confirm with user first.
|
||||
- One-time approval does not mean blanket approval — re-confirm in new contexts.
|
||||
33
common.md
Normal file
33
common.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Common Agent Skills
|
||||
|
||||
## Code Style
|
||||
|
||||
- Write clean, minimal code. No unnecessary comments unless the *why* is non-obvious.
|
||||
- Prefer editing existing files over creating new ones.
|
||||
- Do not add error handling or validation for scenarios that cannot happen.
|
||||
- Three similar lines is better than a premature abstraction.
|
||||
- No half-finished implementations.
|
||||
|
||||
## Task Approach
|
||||
|
||||
- For exploratory questions, respond with a recommendation and the main tradeoff in 2-3 sentences before implementing.
|
||||
- Do not add features, refactor, or introduce abstractions beyond what the task requires.
|
||||
- Default to the simplest solution that satisfies the requirement.
|
||||
|
||||
## Security
|
||||
|
||||
- Never introduce command injection, XSS, SQL injection, or other OWASP top 10 vulnerabilities.
|
||||
- Only validate at system boundaries (user input, external APIs). Trust internal code and framework guarantees.
|
||||
- Do not hardcode secrets or credentials in code.
|
||||
|
||||
## Git
|
||||
|
||||
- Write concise commit messages focused on *why*, not *what*.
|
||||
- Prefer creating new commits over amending published ones.
|
||||
- Never force-push to main/master without explicit confirmation.
|
||||
|
||||
## Communication
|
||||
|
||||
- Be concise. Match response length to task complexity.
|
||||
- State results and decisions directly.
|
||||
- When referencing code, include file path and line number when possible.
|
||||
22
sync.sh
Executable file
22
sync.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
SKILLS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Claude Code
|
||||
mkdir -p ~/.claude
|
||||
cat "$SKILLS_DIR/common.md" "$SKILLS_DIR/claude_extra.md" > ~/.claude/CLAUDE.md
|
||||
echo " [ok] ~/.claude/CLAUDE.md"
|
||||
|
||||
# Codex + Antigravity (shared ~/.agents/skills)
|
||||
SKILL_DIR=~/.agents/skills/my-skills
|
||||
mkdir -p "$SKILL_DIR"
|
||||
{
|
||||
printf -- "---\nname: my-skills\ndescription: Personal coding skills and conventions\n---\n\n"
|
||||
cat "$SKILLS_DIR/common.md"
|
||||
echo ""
|
||||
cat "$SKILLS_DIR/agents_extra.md"
|
||||
} > "$SKILL_DIR/SKILL.md"
|
||||
echo " [ok] $SKILL_DIR/SKILL.md"
|
||||
|
||||
echo "synced."
|
||||
Reference in New Issue
Block a user