Skip to content

feat: agent skill for source-coop, installable as a Claude Code plugin - #98

Open
alukach wants to merge 3 commits into
mainfrom
feat/agent-skill
Open

alukach wants to merge 3 commits into
mainfrom
feat/agent-skill

Conversation

@alukach

@alukach alukach commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

AI agents can now learn when to reach for source-coop, not only how. A new Agent Skill, skills/source-coop/SKILL.md, triggers when you mention Source Cooperative, source.coop or data.source.coop, and sends the agent to source-coop --help for everything else. The repository is also a Claude Code plugin marketplace, so it installs in two lines:

# in Claude Code
/plugin marketplace add source-cooperative/source-coop-cli
/plugin install source-coop@source-cooperative

# any other agent that reads skills: copy the folder where it looks for them
cp -r skills/source-coop ~/.your-agent/skills/

How it behaves

The skill is 25 lines and copies no flags, per AGENTS.md ("A skill … should say when to use the CLI and point to --help"). It tells the agent to:

  • run source-coop --help, then <command> --help, since help matches the installed version; if the CLI is missing, point the user to https://cli.source.coop/latest/install/;
  • start with source-coop auth status --json; if not signed in, ask the user to run ! source-coop auth login (it opens a browser, so the agent never runs it), or use SOURCE_TOKEN;
  • pass --json, parse stdout, read errors as JSON on stderr; exit 3 means fix field_errors and retry, 4 not signed in or not allowed, 5 not found;
  • send bodies with -F -, never use -i, ask before deleting, revoking or leaving, then pass --yes;
  • use source-coop api for anything without a command;
  • reach data at s3://ACCOUNT/PRODUCT/ on https://data.source.coop (public data needs no sign-in), with each tool's settings left to https://docs.source.coop/data-proxy rather than copied into the skill, and look in source-coop --help for credentials (creds, and exec where installed, so it reads right before and after feat: exec, to run S3 tools against the data proxy, signed in or not #43);
  • prefer the Portolan CLI, if installed, for publishing geospatial datasets with metadata.

The marketplace is named source-cooperative and lists one plugin, source-coop, whose root is the repository root ("source": "./"). plugin.json has no version, so installs follow the latest commit on main rather than being pinned.

Docs changes

  • Scripts and AI agents gains an Agent skill subsection: what the skill does and how to install it. No ## heading changed, so the contents list and site pages are the same. Preview: https://cli.source.coop/pr-preview/pr-98/scripts-and-ai-agents/#agent-skill
  • AGENTS.md: under Help is the agents' documentation, the skill must stay in step with FOR_SCRIPTS and the CLI's behaviour, changed in the same commit, and claude plugin validate . checks the plugin.

Not in this PR

  • A plugin version. claude plugin validate warns that it's missing. Without one, users get each new commit on main; with one, someone (or release-please) must bump it. Worth adding if the skill ever needs to match released CLI versions.
  • An icon, which only matters for a listing in Anthropic's plugin directory.
  • llms.txt on the docs site. Could follow the same rule: say when to use the CLI and point to --help.

Testing

  • claude plugin validate . (Claude Code 2.1.319): passes, with warnings for the missing version, the repository's CLAUDE.md at the plugin root (not loaded by plugins; harmless), and no icon.
  • Installed from a throwaway CLAUDE_CONFIG_DIR, both from the local checkout and from GitHub at this branch (/plugin marketplace add source-cooperative/source-coop-cli#feat/agent-skill): claude plugin details source-coop lists Skills (1) source-coop.
  • cargo test and cargo test --features staging: 179 passed (no Rust changes, no tests added).
  • Docs site built locally; the skill link points at GitHub.
  • Not tried: an agent session actually triggering the skill and following it against a real or staging API. No demos, since no command changed.

🤖 Generated with Claude Code

skills/source-coop/SKILL.md tells agents when to use the CLI and sends
them to --help for the rest. .claude-plugin/ publishes it as a plugin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Claude finished @alukach's task in 12s —— View job


✅ No blocking issues — safe to merge.

I read the full diff (plugin manifests, SKILL.md, README and AGENTS.md edits). I did not run the plugin validator or an agent session.

  • The license in plugin.json (Apache-2.0) matches LICENSE and Cargo.toml.
  • The skill says to run auth login only through the user, which fits the README's note that login opens a browser. The --yes rule, -F - rule and exit codes 3/4/5 match the AGENTS.md table.
  • The skill copies no flags, as AGENTS.md requires. The README examples put comments above commands, and the new ### heading adds no site page.

Notes (non-blocking)

Simplify (ponytail)

  • .claude-plugin/plugin.json:6-11: homepage, keywords, and the duplicate description and author are optional. Cut them, since the marketplace entry already carries a description, and add them back if the plugin goes into a directory listing.
  • .claude-plugin/marketplace.json:3: the top-level description and owner.url are optional metadata. Keep only name, owner.name and plugins if you want it minimal.
    · branch feat/agent-skill

💰 Estimated review cost: $0.12 · 0m12s · 5 turns

github-actions Bot added a commit that referenced this pull request Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview: https://cli.source.coop/pr-preview/pr-98/

Built from 9f4262a. It goes live a minute or two after this run, once GitHub Pages deploys it, and is removed when the PR closes.

alukach and others added 2 commits November 9, 2026 10:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot added a commit that referenced this pull request Nov 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant