Skip to content

Self-host repo as a Claude Code plugin#86

Merged
yourconscience merged 7 commits into
mainfrom
plugin
Jun 10, 2026
Merged

Self-host repo as a Claude Code plugin#86
yourconscience merged 7 commits into
mainfrom
plugin

Conversation

@yourconscience

@yourconscience yourconscience commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Publishes this repo as a self-hosted Claude Code plugin and single-plugin marketplace.

What ships

  • .claude-plugin/{plugin,marketplace.json} — install via /plugin marketplace add yourconscience/dotagents then /plugin install dotagents@yourconscience (private repo needs git auth).
  • All 15 skills (namespaced /dotagents:<skill>) + 4 subagent roles.
  • dotagents render writes Claude agent files to agents/*.md (beside the .yaml sources); dotagents doctor plugin agents check fails on drift.

Verified locally

claude 2.1.170: marketplace add + install → details show Skills (15) + Agents (4).

Two facts the local test pinned down:

  • Claude auto-discovers plugin agents from top-level agents/*.md only — no recursion, and the plugin.json agents array does not register them. Hence renders live in agents/, manifest carries no agents field.
  • Claude's tools: frontmatter must stay comma-separated (per docs); agnix wrongly demands a YAML list, so agents/*.md is excluded from agnix and validated by the plugin agents doctor check instead.

Why Claude Code only (Codex dropped)

Codex 0.136.0 plugins require a subdirectory plugin with a real, copied skills/ inside it — verified that a root plugin, source.path "./"/".", auto-detect, and symlinked skills all fail to register. Bundling the 31MB shared skills/ into a committed subdir would create a second source of truth, so Codex (like Droid, Amp, Hermes, Pi) consumes these skills via dotagents sync, not a plugin. README and the dotagents.yaml catalog entry document this explicitly.

Notes

  • Machines running dotagents sync should not also install the plugin (every skill would appear twice).
  • Pre-existing cua-driver symlink removal is a separate commit.

Per-agent delivery mode (added)

agents[].delivery: sync | plugin in dotagents.yaml (default sync; plugin valid only for claude-code). With delivery: plugin, dotagents sync skips and prunes claude-code's managed skill symlinks and generated agent files (marker-checked; never touches unmanaged files) while MCP/hooks keep syncing. A claude delivery doctor/status check reads ~/.claude/plugins/installed_plugins.json and enforces single-channel delivery: fail if plugin mode without the plugin installed or with leftover symlinks, warn if sync mode with the plugin installed. dotagents plugin add|remove wraps the claude CLI install/uninstall, flips the mode via comment-preserving YAML edit, and prunes/restores. Implementation delegated to a local Codex agent; reviewed, tested (7 new tests), and verified here.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for self-hosting the repository as a Claude Code plugin, introducing plugin manifests, a new render command to generate Claude-native subagent markdown files from YAML sources, and corresponding validation checks in dotagents doctor. The review feedback is highly constructive, pointing out a critical issue where the rendering process could accidentally delete manually created markdown files (like a README.md) in the agents/ directory. The reviewer suggested checking for a generatedAgentMarker before deletion, with corresponding updates to the tests and doctor checks, as well as correcting a path in the CLI help text.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread cmd/dotagents/agents.go
Comment thread cmd/dotagents/agents_test.go
Comment thread cmd/dotagents/doctor.go Outdated
Comment thread cmd/dotagents/main.go Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df1f62b62d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/dotagents/agents.go

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7937b399c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .claude-plugin/plugin.json Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c0d469085

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/dotagents/delivery.go
return report, nil
}

skills, external, err := claudeManagedSkillArtifacts(agent.SkillRoot, repoRoot, agentsSkillRoot)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep syncing configured plugin skills under plugin delivery

When delivery: plugin is used with enabled plugin skill entries targeted at Claude Code (for example the enabled browser, build-ios-apps, and frontend-design entries in dotagents.yaml), inspectAgents has already added those skills to the expected set, but this branch throws that set away and only reports repo-managed symlinks for pruning. Because applyAgentSync then skips all add/update work for plugin delivery, a fresh machine switched to plugin delivery never gets those configured plugin skill surfaces in ~/.claude/skills unless they happened to be left over from a previous sync; dotagents status will still consider it synced.

Useful? React with 👍 / 👎.

@yourconscience yourconscience merged commit de66dbf into main Jun 10, 2026
5 checks passed
@yourconscience yourconscience deleted the plugin branch June 10, 2026 13:04
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