Skip to content

Filip-Kin/CTRE-Skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phoenix6-frc Claude Code Skill

A distributable Claude Code skill that makes Claude significantly better at writing CTRE Phoenix 6 Java code for FRC robots.

What This Skill Does

When installed, Claude automatically loads Phoenix 6 knowledge when you mention TalonFX, Kraken, CANcoder, Pigeon2, MotionMagic, Phoenix 6, CTRE, or swerve drive in an FRC Java context. It provides:

  • 15 Phoenix 5 → 6 migration gotchas (units, API changes, common mistakes)
  • Quick-reference cheat sheet (control requests, config patterns, gain table)
  • Dense API reference (exact field names, method signatures, enums)
  • 8 copy-paste code patterns (subsystem init, position/velocity/MotionMagic control, simulation, follower, CANcoder fusion)
  • Phoenix Tuner X + Swerve Generator reference (workflow, TunerConstants fields, integration)

Supported Tools

Tool File How
Claude Code phoenix6-frc.skill Upload via Settings → Features, or unzip into .claude/skills/
GitHub Copilot copilot-instructions.md Copy to .github/copilot-instructions.md in your robot project
Cursor (modern) phoenix6-frc.mdc Copy to .cursor/rules/phoenix6-frc.mdc
Cursor (legacy) cursorrules Copy to .cursorrules in your robot project

Download all files from the latest release.

To regenerate the adapter files locally:

python scripts/generate_adapters.py
# Writes copilot-instructions.md, cursorrules, phoenix6-frc.mdc to adapters/

Installing the Skill

Option A: From the .skill file (ZIP upload)

  1. Download or build phoenix6-frc.skill
  2. In Claude Code: Settings → Features → Upload Skill
  3. Select phoenix6-frc.skill

Option B: From the directory (development / project-level)

# For this project only (.claude/skills/ in your robot repo):
cp -r phoenix6-frc/ /path/to/robot-project/.claude/skills/phoenix6-frc/

# For all your projects (user-level):
cp -r phoenix6-frc/ ~/.claude/skills/phoenix6-frc/

Option C: Git submodule (team repos)

# In your robot project:
git submodule add https://github.com/your-org/ctre-skill .claude/skills/phoenix6-frc

Building the .skill File

python scripts/package_skill.py
# Produces: phoenix6-frc.skill at the repo root

The .skill file is a ZIP. You can verify its contents with:

python -c "import zipfile; [print(n) for n in zipfile.ZipFile('phoenix6-frc.skill').namelist()]"

Updating for a New Phoenix 6 Season

  1. Run the scraper to fetch updated docs and examples:

    python phoenix6-frc/scripts/scrape_phoenix6.py --version 27.0.0

    This writes references/phoenix6-api-scraped.md and references/phoenix6-patterns-scraped.md (note: different filenames — they don't overwrite the curated files).

  2. Review the diff between scraped output and curated files:

    • Check for new control request classes in the controls package
    • Check for new config fields in config classes
    • Update curated files as needed
  3. Update SKILL.md frontmatter phoenix6_version and frc_season

  4. Repackage:

    python scripts/package_skill.py
  5. Commit and distribute the updated skill

File Structure

phoenix6-frc/               ← the skill directory (installed by users)
  SKILL.md                  ← skill entrypoint: gotchas, cheat sheet, reference index
  references/
    phoenix6-api.md         ← dense field/method tables (loaded on demand)
    phoenix6-patterns.md    ← 9 copy-paste Java patterns (loaded on demand)
    tuner-x.md              ← Tuner X + Swerve Generator reference (hand-authored)
  scripts/
    scrape_phoenix6.py      ← regenerates references from live docs (stdlib only)
scripts/
  package_skill.py          ← build tool: produces phoenix6-frc.skill
README.md                   ← this file
.gitignore

Notes

  • phoenix6-frc.skill is excluded from git (.gitignore) — it's a build artifact
  • The scraper uses Python stdlib only — no pip install required
  • tuner-x.md is hand-authored and not regenerated by the scraper
  • All patterns target Java (not C++ or Python)
  • Phoenix 6 version covered: 26.1.x (2026 season)

About

Claude Code skill for CTRE Phoenix 6 FRC Java development

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages