Agent Skills for AI Coding Assistants
What are Agent Skills?
The rdetoolkit source repository includes a development guide (.agents/SKILL.md) that AI coding assistants like Claude Code automatically detect and use.
When this file exists in a repository, the AI assistant generates code with awareness of rdetoolkit's API conventions and project structure. For example, it knows to use rdetoolkit.fileops.read_from_json_file() instead of the standard json.load() for reading JSON files, and applies this knowledge without being told.
Difference from the Agent Guide API
rdetoolkit ships two separate AI assistant guides. They serve different purposes.
Agent Guide (_agent/ directory)
A guide bundled inside the installed package. Accessible via API or CLI after pip install.
1 2 3 | |
1 | |
This is a general-purpose guide available in any environment where rdetoolkit is installed. Use it when you've installed rdetoolkit as a dependency but haven't cloned the source repository.
Agent Skills (.agents/ directory)
A guide placed in the source repository. Claude Code loads it automatically when opening the project and uses it as contextual guidance throughout the development session.
Agent Skills go deeper than the Agent Guide. They include a processing mode selection flowchart, correct CLI operation order, configuration file specs, common mistakes with fixes, and a complete pattern for building structured processing from scratch.
Setup
Using with the rdetoolkit source repository
If you've cloned the rdetoolkit repository, Agent Skills work out of the box. No additional configuration needed.
1 2 3 | |
Adding to your own project
If you're developing a structured processing project in a separate repository, follow these steps.
1. Copy the canonical source
Place the skill files in .agents/skills/rdetoolkit-skill/.
1 2 3 | |
2. Create symlinks for your AI agent(s)
Each AI coding assistant reads skill files from its own dedicated directory. Create symlinks (or copies) for the agents you use.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
You only need to set up the directories for the agents you actually use.
Agent Skills structure
When added to your own project, the directory layout looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
.agents/skills/rdetoolkit-skill/ is the single source of truth. Agent-specific directories contain symlinks pointing back to it. Updating the canonical source automatically propagates changes to all agents.
SKILL.md
The main entry point. YAML frontmatter defines activation triggers — the skill activates when rdetoolkit import statements, RDE-related keywords, or specific CLI commands are detected.
Covers the following:
- Quick start from project initialization to dataset function implementation
- Encoding-safe file I/O with
rdetoolkit.fileops - Metadata writing via the
Metaclass - Error handling pattern using the Result type
- Processing mode selection table and flowchart
- Correct execution order for CLI template editing and validation
- Step-by-step guide for building structured processing autonomously
- Common mistakes and fixes
references/building-structured-processing.md
The complete implementation pattern for building a structured processing program from scratch. Includes the standard dataset function layout, metadata-def.json format, Meta class usage, Result-type error handling, directory specifications, and a submission checklist.
references/preferred-apis.md
Detailed coverage of rdetoolkit.fileops and rdetoolkit.csv2graph APIs. Explains why standard Python file operations must not be used — with code examples and anti-patterns showing how to handle legacy Japanese encodings like Shift_JIS, EUC-JP, and CP932.
references/modes.md
A detailed reference for all five processing modes (Invoice, ExcelInvoice, SmartTableInvoice, MultiDataTile, RDEFormat). Each mode includes configuration examples, use cases, directory layouts, and a comparison table.
references/cli-workflow.md
Complete CLI command reference. Covers the correct order for template file editing, validation execution sequence, CI/CD integration examples, and a validation error troubleshooting table.
references/config.md
Configuration file specification for both rdeconfig.yaml and pyproject.toml formats. Includes per-mode configuration examples, field reference table, magic variables, and common configuration mistakes.
Rules the AI assistant enforces automatically
When Agent Skills are active, the AI assistant applies the following rules without being asked:
- Uses
rdetoolkit.fileopsfor all JSON file reads and writes (neverjson.load()) - Uses the
Metaclass for writing metadata.json (never manual JSON construction) - Uses the Result type for error handling in helper functions
- Uses
RdeDatasetPathsattributes instead of hardcoded paths - Edits template files in the correct order: schema, then metadata-def, then invoice
- Runs validation in the correct order: schema, then invoice, then metadata-def
These rules are defined in the "Critical Rules" section of SKILL.md. To add project-specific rules, edit SKILL.md directly or add them to CLAUDE.md at the project root.