Repository navigation
Ship the swift-section agent plugin for Claude Code and Codex - #126
Merged
Merged
Conversation
One plugin directory carries both tools' manifests and a single skill that teaches an agent to drive the CLI, including the objc subcommands. The two marketplace files sit where each tool looks for them in a repository root. The directory is AgentPlugins/ because plugins/ would be SwiftPM's Plugins/ on a case-insensitive disk.
Claude Code and Codex only update an installed plugin when its version changes, so a release that forgets the plugin leaves its users on the old skill with nothing to tell them.
README gains install instructions, AGENTS.md the rule that a CLI change updates the skill in the same batch, plus the proposal and the evolution log entry.
# Conflicts: # README.md
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add release-time plugin version gating and correct the documented snapshot dependency-path behavior.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds a distributable swift-section agent plugin for Claude Code and Codex.
Changes:
- Adds plugin manifests, marketplace registrations, and Swift/Objective-C CLI skills.
- Adds documentation and maintenance guidance.
- Adds CI validation for plugin and CLI version alignment.
| File | Summary |
|---|---|
Sources/swift-section/Version.swift |
Release-version maintenance note |
README.md |
Plugin installation documentation |
Documentations/Internal/ProjectEvolutionLog.md |
Evolution log entry |
Documentations/Evolutions/README.md |
Evolution index entry |
Documentations/Evolutions/0051-agent-plugin.md |
Agent plugin proposal |
AGENTS.md |
Plugin maintenance guidance |
AgentPlugins/swift-section/skills/swift-section-cli/SKILL.md |
Main CLI skill |
AgentPlugins/swift-section/skills/swift-section-cli/references/objc.md |
Objective-C CLI reference |
AgentPlugins/swift-section/.codex-plugin/plugin.json |
Codex plugin manifest |
AgentPlugins/swift-section/.claude-plugin/plugin.json |
Claude plugin manifest |
.github/workflows/version-check.yml |
Plugin version validation |
.claude-plugin/marketplace.json |
Claude marketplace registration |
.agents/plugins/marketplace.json |
Codex marketplace registration |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+47
to
+65
| - name: Verify agent plugin versions match | ||
| run: | | ||
| set -euo pipefail | ||
| value="${{ steps.version.outputs.version }}" | ||
| # Claude Code and Codex only update an installed plugin when its | ||
| # version changes, so a release that leaves these behind never | ||
| # reaches the users of the plugin. | ||
| status=0 | ||
| for manifest in AgentPlugins/swift-section/.claude-plugin/plugin.json \ | ||
| AgentPlugins/swift-section/.codex-plugin/plugin.json; do | ||
| pluginVersion=$(jq -r '.version // empty' "$manifest") | ||
| if [ "$pluginVersion" != "$value" ]; then | ||
| echo "::error file=$manifest::version is '$pluginVersion' but BundledVersion.value is '$value' — bump the plugin with the CLI." | ||
| status=1 | ||
| else | ||
| echo "$manifest: $pluginVersion" | ||
| fi | ||
| done | ||
| exit $status |
| cross-module type's layout, an Objective-C superclass (`override`, explicit selectors). By | ||
| default the tool infers paths from where the binary sits and falls back to the running | ||
| system's cache — which never offers an image of another platform. So an iOS binary read on a | ||
| macOS host needs `--dependency-search-path` (`dump`, `interface`, `snapshot`; repeatable) |
Comment on lines
+111
to
+119
| `interface` writes its progress lines to **stdout**, mixed into the product: | ||
|
|
||
| ``` | ||
| $ swift-section interface -a arm64e /bin/ls > out.txt # WRONG | ||
| $ head -3 out.txt | ||
| Preparing to build Swift interface... | ||
| [INFO] Extracted 0 symbol index | ||
| [INFO] Types: 0 successful, 0 failed, ... | ||
| ``` |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Summary
Adds an agent plugin,
swift-section, that teaches Claude Code and Codex how to drive theswift-sectionCLI. Users install it straight from this repository:The skill previously lived only in a maintainer's local agent configuration, so nobody else could install it and nothing kept it in step with the CLI.
What changes
AgentPlugins/swift-section/— one plugin directory with both tools' manifests and a single skill (skills/swift-section-cli/SKILL.mdplusreferences/objc.mdfor theobjcsubcommands). Every--flagthe skill names was checked against the 0.20.0--helpoutput..claude-plugin/marketplace.jsonand.agents/plugins/marketplace.json— where Claude Code and Codex respectively look for a marketplace in a repository root. Both point at the same plugin directory.AgentPlugins/, notplugins/: on a case-insensitive disk that would be SwiftPM's existingPlugins/.version-check.ymlgains a step requiring bothplugin.jsonversions to equalBundledVersion.value. Both tools only update an installed plugin when that version changes, so a release that forgets the plugin would silently strand its users.AGENTS.mdgains the maintenance rule (a CLI change updates the skill in the same batch); README gains an "Agent Plugin" section; evolution proposal 0051 and the evolution log record the decision.No library or CLI code changes —
Version.swiftonly gains a comment line.Verification
claude plugin validate AgentPlugins/swift-sectionandclaude plugin validate .claude-plugin/marketplace.json --strictpass.validate_plugin.pyandquick_validate.pypass; in a scratchCODEX_HOMEthe marketplace was added, listed, and the plugin installed with its skill in the plugin cache.