-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add: built-in agent skill for AI coding assistants (agentskills.io) #395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hyunhee-jo
wants to merge
14
commits into
main
Choose a base branch
from
feature/agent-skill-odl-pdf
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
14cf497
Add: built-in agent skill for AI coding assistants (agentskills.io)
hyunhee-jo faf526c
refactor: apply review feedback (round 1)
hyunhee-jo 98c6cc7
refactor: apply PR review feedback (round 2)
hyunhee-jo c9d3d48
fix: use rapidfuzz Indel API instead of Levenshtein for NID scoring
hyunhee-jo a5715a6
fix: check all hybrid deps (docling + fastapi + uvicorn) in detect-en…
hyunhee-jo 26ece8b
fix: improve CI drift check — self-validation trigger + exit code han…
hyunhee-jo 9a28256
refactor(skill): reduce SKILL.md to 595 lines + close documentation gaps
hyunhee-jo b9e2cb3
fix(skill): make quick-eval.py survive cp1252/cp949 consoles and clea…
hyunhee-jo 1fa360e
test+ci(skill): multi-model evaluation infrastructure and cross-platf…
hyunhee-jo a0c7914
feat(skill): respond to PR review #4251171155 — convention-aligned ta…
hyunhee-jo c1fa607
Merge branch 'main' into feature/agent-skill-odl-pdf
hyunhee-jo e8df66b
refactor(skill): drop API-based eval runner and workflow from PR scope
hyunhee-jo 4db0902
docs(skill): link Version Compatibility table to canonical manifests
hyunhee-jo a23f865
docs(skill): pre-merge polish
hyunhee-jo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "name": "opendataloader-pdf", | ||
| "owner": { | ||
| "name": "OpenDataLoader Project" | ||
| }, | ||
| "metadata": { | ||
| "description": "AI-powered PDF extraction guidance and automation", | ||
| "version": "1.0.0" | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "name": "odl-pdf-skills", | ||
| "description": "Expert guidance for opendataloader-pdf — environment detection, option recommendations, hybrid mode setup, quality diagnostics, and direct conversion execution", | ||
| "source": "./", | ||
| "skills": [ | ||
| "./skills/odl-pdf" | ||
| ] | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # skill-drift-check.yml | ||
| # Ensures skill references stay in sync with options.json when CLI options change. | ||
| # Runs sync-skill-refs.py and fails the check if drift is detected (exit code 1). | ||
|
|
||
| name: Skill Drift Check | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'options.json' | ||
| pull_request: | ||
| paths: | ||
| - 'options.json' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| check-drift: | ||
| runs-on: ubuntu-latest | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' | ||
|
|
||
| - name: Check skill drift | ||
| run: | | ||
| set +e | ||
| python skills/odl-pdf/scripts/sync-skill-refs.py | ||
| EXIT_CODE=$? | ||
| if [ $EXIT_CODE -ne 0 ]; then | ||
| echo "" | ||
| echo "Drift detected: skill references are out of sync with options.json." | ||
| echo "Update skills/odl-pdf/references/options-matrix.md to match options.json." | ||
| exit 1 | ||
|
coderabbitai[bot] marked this conversation as resolved.
coderabbitai[bot] marked this conversation as resolved.
|
||
| fi | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,4 +75,3 @@ logs/ | |
| # Configuration files | ||
| .claude/settings.local.json | ||
| .claude/plans/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,166 @@ | ||
| # Agent Skills | ||
|
|
||
| opendataloader-pdf ships built-in agent skills that help AI coding assistants use this project effectively. Skills follow the [agentskills.io](https://agentskills.io) specification and work with Claude Code, Codex, Gemini CLI, Cursor, VS Code, and 26+ platforms. | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| ``` | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| skills/ | ||
| ├── README.md ← You are here | ||
| └── odl-pdf/ ← One skill per directory | ||
| ├── SKILL.md ← Main skill file (loaded when activated) | ||
| ├── references/ ← Deep-dive docs (loaded on demand) | ||
| │ ├── options-matrix.md | ||
| │ ├── hybrid-guide.md | ||
| │ ├── format-guide.md | ||
| │ ├── installation-matrix.md | ||
| │ └── eval-metrics.md | ||
| ├── scripts/ ← Executable helpers | ||
| │ ├── detect-env.sh | ||
| │ ├── hybrid-health.sh | ||
| │ ├── quick-eval.py | ||
| │ └── sync-skill-refs.py | ||
| └── evals/ ← Quality test cases | ||
| └── evals.json | ||
| ``` | ||
|
|
||
| ## How Skills Work | ||
|
|
||
| ### Progressive Disclosure (3 Levels) | ||
|
|
||
| | Level | Content | When Loaded | | ||
| |-------|---------|-------------| | ||
| | **L1** | `description` field in SKILL.md frontmatter (~100 words) | Always visible to skill router | | ||
| | **L2** | SKILL.md body (~400 lines) — persona, workflows, decision trees, gotchas | When skill is activated | | ||
| | **L3** | `references/*` files — detailed option matrices, guides, metrics | When the user enters that topic | | ||
|
|
||
| This design minimizes token usage. The AI agent only loads what it needs for the current task. | ||
|
|
||
| ### Dual-Path Option Reference | ||
|
|
||
| Skills must work for **both** source-code users and pip-install users: | ||
|
|
||
| - **Built-in summaries** (`references/options-matrix.md`): Always available, even without source code | ||
| - **Dynamic reference** (`options.json`): Authoritative source when the source repo is available | ||
|
|
||
| SKILL.md instructs the AI: "If `options.json` exists in this project, it is the source of truth. Options in `options.json` not found in `options-matrix.md` are newly added." | ||
|
|
||
| ## Creating a New Skill | ||
|
|
||
| ### 1. Create the Directory | ||
|
|
||
| ``` | ||
| skills/my-skill/ | ||
| ├── SKILL.md | ||
| ├── references/ (optional) | ||
| ├── scripts/ (optional) | ||
| └── evals/ (optional) | ||
| ``` | ||
|
|
||
| ### 2. Write SKILL.md | ||
|
|
||
| The SKILL.md file has two parts: | ||
|
|
||
| **Frontmatter** (YAML between `---` markers): | ||
|
|
||
| ```yaml | ||
| --- | ||
| name: my-skill | ||
| description: > | ||
| One paragraph (~100 words) explaining what this skill does. | ||
| Include trigger keywords so the skill router knows when to activate. | ||
| Include "Do NOT use for:" to prevent false activations. | ||
| --- | ||
| ``` | ||
|
|
||
| **Body** (Markdown): | ||
|
|
||
| - Define a persona (who the AI becomes when this skill is active) | ||
| - Define a workflow (numbered phases the AI follows) | ||
| - Include decision trees for common choices | ||
| - List critical gotchas the AI must always warn about | ||
| - Reference deeper docs with: "See `references/filename.md` for details" | ||
|
|
||
| ### 3. Write Evals | ||
|
|
||
| Create `evals/evals.json` with test scenarios: | ||
|
|
||
| ```json | ||
| { | ||
| "version": "1.0", | ||
| "skill": "my-skill", | ||
| "evals": [ | ||
| { | ||
| "id": "eval-001", | ||
| "scenario": "Description of the user's situation", | ||
| "user_input": "What the user says", | ||
| "expected_recommendations": ["What the AI should recommend"], | ||
| "must_mention": ["Required terms in the response"], | ||
| "must_not_mention": ["Forbidden terms"] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| ### 4. Register in marketplace.json | ||
|
|
||
| Add your skill to `.claude-plugin/marketplace.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "plugins": [{ | ||
| "skills": ["./skills/odl-pdf", "./skills/my-skill"] | ||
| }] | ||
| } | ||
| ``` | ||
|
|
||
| ### 5. Test | ||
|
|
||
| Test by spawning an AI agent that knows nothing about the project, loading only your SKILL.md, and asking it the eval scenarios. All `must_mention` terms should appear; no `must_not_mention` terms should appear. | ||
|
|
||
| ## Modifying the Existing Skill | ||
|
|
||
| ### When CLI Options Change | ||
|
|
||
| 1. Run `npm run sync` (regenerates `options.json`) | ||
| 2. Update `skills/odl-pdf/references/options-matrix.md` — add the new option to the appropriate category | ||
| 3. If the option has interaction rules, document them in the "Interaction Rules" section | ||
| 4. CI (`skill-drift-check.yml`) will catch any mismatch you miss | ||
|
|
||
| ### When Adding a New Hybrid Backend | ||
|
|
||
| 1. Update `skills/odl-pdf/references/hybrid-guide.md` — add to the Backend Registry table | ||
| 2. SKILL.md's decision tree says "check `options.json` for allowed hybrid values" — new backends are auto-discovered | ||
|
|
||
| ### When Adding a New Output Format | ||
|
|
||
| 1. Update `skills/odl-pdf/references/format-guide.md` — add to the format table with downstream use mapping | ||
| 2. The format list in `options.json` is auto-discovered by the skill | ||
|
|
||
| ## CI Integration | ||
|
|
||
| ### Drift Check (`skill-drift-check.yml`) | ||
|
|
||
| Runs automatically when `options.json` changes. Compares option names in `options.json` against `options-matrix.md` and fails if they diverge. | ||
|
|
||
| Run manually: | ||
|
|
||
| ```bash | ||
| python skills/odl-pdf/scripts/sync-skill-refs.py | ||
| ``` | ||
|
|
||
| ## Writing Guidelines | ||
|
|
||
| - **Language**: English only (external open-source users) | ||
| - **No internal terminology**: No company names, team names, or internal tool references | ||
| - **Tone**: Senior engineer pair-programming — diagnose first, prescribe later | ||
| - **Java guidance**: Always mention Java 11+ requirement. Never recommend specific JDK distributions or download links. | ||
| - **Gotchas**: Only include gotchas that affect external users. Internal development gotchas belong in CLAUDE.md. | ||
|
|
||
| ## References | ||
|
|
||
| - [agentskills.io specification](https://agentskills.io) — Multi-agent skill format standard | ||
| - [Claude Code Skills](https://docs.anthropic.com/en/docs/claude-code) — Claude Code skill documentation | ||
| - `.claude-plugin/marketplace.json` — Plugin registration for this project | ||
| - `CLAUDE.md` — Internal development notes (not for the skill) | ||
| - `CONTRIBUTING.md` — Contributor guidelines including skill maintenance | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.