Skip to content

Ship the swift-section agent plugin for Claude Code and Codex - #126

Merged
Mx-Iris merged 4 commits into
mainfrom
feature/agent-plugin
Sep 27, 2026
Merged

Mx-Iris merged 4 commits into
mainfrom
feature/agent-plugin

Conversation

@Mx-Iris

@Mx-Iris Mx-Iris commented Sep 27, 2026

Copy link
Copy Markdown
Member

Summary

Adds an agent plugin, swift-section, that teaches Claude Code and Codex how to drive the swift-section CLI. Users install it straight from this repository:

# Claude Code (inside a session)
/plugin marketplace add MxIris-Reverse-Engineering/MachOSwiftSection
/plugin install swift-section@machoswiftsection

# Codex
codex plugin marketplace add MxIris-Reverse-Engineering/MachOSwiftSection
codex plugin add swift-section@machoswiftsection

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.md plus references/objc.md for the objc subcommands). Every --flag the skill names was checked against the 0.20.0 --help output.
  • .claude-plugin/marketplace.json and .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.
  • The directory is AgentPlugins/, not plugins/: on a case-insensitive disk that would be SwiftPM's existing Plugins/.
  • version-check.yml gains a step requiring both plugin.json versions to equal BundledVersion.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.md gains 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.swift only gains a comment line.

Verification

  • claude plugin validate AgentPlugins/swift-section and claude plugin validate .claude-plugin/marketplace.json --strict pass.
  • Codex's validate_plugin.py and quick_validate.py pass; in a scratch CODEX_HOME the marketplace was added, listed, and the plugin installed with its skill in the plugin cache.
  • The new CI step, run locally under bash, passes with matching versions and reports both files when they differ.

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.
Copilot AI lite review requested due to automatic review settings September 27, 2026 03:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Add release-time plugin version gating and correct the documented snapshot dependency-path behavior.

Review effort: Lite
Findings: 1 High severity

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
Copilot AI review requested due to automatic review settings September 27, 2026 03:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Moderate issues remain in snapshot guidance and release-workflow version validation.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity · 1 Low severity

Open (3)

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, ...
```
@Mx-Iris
Mx-Iris merged commit 03cc133 into main Sep 27, 2026
4 checks passed
@Mx-Iris
Mx-Iris deleted the feature/agent-plugin branch September 28, 2026 09:57
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.

2 participants