Skip to content

feat(claude): ponytail pluginを追加 - #63

Merged
hitsan merged 1 commit into
mainfrom
feature/add-ponytail-plugin
Aug 7, 2026
Merged

hitsan merged 1 commit into
mainfrom
feature/add-ponytail-plugin

Conversation

@hitsan

@hitsan hitsan commented Aug 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • marketplace DietrichGebert/ponytail からponytail pluginを有効化する

Test plan

  • home-manager switch --flake . で settings.json が反映されることを確認
  • Claude Code起動時に ponytail plugin が有効になっていることを確認

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Enabled the Ponytail plugin.
    • Added the Ponytail GitHub marketplace as an available plugin source.

marketplace DietrichGebert/ponytail からponytail pluginを有効化する。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Claude template now enables the ponytail@ponytail plugin and registers DietrichGebert/ponytail as a GitHub marketplace source.

Changes

Claude Ponytail Plugin

Layer / File(s) Summary
Register and enable Ponytail
modules/ai/claude/template/settings.json
The configuration enables ponytail@ponytail and adds the DietrichGebert/ponytail marketplace definition.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the addition of the ponytail plugin to the Claude configuration, which is the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add-ponytail-plugin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@modules/ai/claude/template/settings.json`:
- Around line 168-173: Update the ponytail entry in extraKnownMarketplaces by
adding its reviewed GitHub release tag as the source ref. Keep the existing
repository configuration unchanged otherwise, ensuring marketplace refreshes
remain pinned until this configuration is explicitly updated.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4decc1c7-6725-45d0-9bf2-bf9ca44502ff

📥 Commits

Reviewing files that changed from the base of the PR and between 5d032cc and 25773a4.

📒 Files selected for processing (1)
  • modules/ai/claude/template/settings.json

Comment on lines +168 to +173
},
"ponytail": {
"source": {
"source": "github",
"repo": "DietrichGebert/ponytail"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== target file excerpt =="
sed -n '150,190p' modules/ai/claude/template/settings.json 2>/dev/null || true

echo
echo "== other marketplace sources in settings =="
python3 - <<'PY'
import json
from pathlib import Path
p=Path('modules/ai/claude/template/settings.json')
if p.exists():
    data=json.loads(p.read_text())
    for key, value in data.items():
        s=value.get('source') if isinstance(value, dict) else None
        if s and isinstance(s, dict) and s.get('source') == 'github':
            print(key, {k:v for k,v in s.items() if k in {"source","repo","ref"}})
PY

echo
echo "== Ponytail repository hooks files (read-only metadata) =="
tmp="$(mktemp -d)"
cd "$tmp"
git init -q
git remote add origin https://github.com/DietrichGebert/ponytail.git
python3 - <<'PY'
import subprocess, sys, json
from pathlib import Path
try:
    subprocess.run(['git','ls-tree','-r','HEAD'], check=True, text=True, capture_output=True, stdout=subprocess.PIPE)
except Exception as e:
    sys.exit(0)
PY
if command -v gh >/dev/null 2>&1; then
  echo "gh available"
  gh api repos/DietrichGebert/ponytail/git/trees/HEAD?recursive=true --jq '.tree[] | select((.type=="blob") and (((.path|starts_with(".github/workflows/")) or (.path|ends_with("hook")) or (.path|contains("hook")))) or (.type=="submodule"))' 2>/dev/null | sed -n '1,120p' || true
else
  echo "gh not available"
fi

echo
echo "== Claude docs snippets if available locally =="
rg -n '"ref"|marketplace|Github marketplace|ponytail' -S . --glob '!node_modules' --glob '!dist' --glob '!build' 2>/dev/null | sed -n '1,120p' || true

Repository: hitsan/dotfiles

Length of output: 1066


🌐 Web query:

Claude Code marketplace sources ref github settings.json

💡 Result:

In Claude Code, you can configure additional plugin marketplaces by adding them to the extraKnownMarketplaces field within your .claude/settings.json file [1][2][3]. When using a GitHub-based source for a marketplace, the configuration follows this structure [1][3]: { "extraKnownMarketplaces": { "my-marketplace-name": { "source": { "source": "github", "repo": "owner/repo", "ref": "branch-or-tag-name" } } } } Key details regarding this configuration include: Marketplace Source: The source field defines where Claude Code fetches the marketplace catalog (a marketplace.json file) [1]. GitHub Support: For GitHub-based marketplace sources, you can use the ref field to specify a git branch or tag [1]. If omitted, it defaults to the repository's default branch [1]. Usage: When team members trust the project directory, Claude Code will prompt them to install marketplaces defined in the project's .claude/settings.json [1][2][3]. Distinction: Note that ref is supported for marketplace sources, whereas individual plugins listed inside a marketplace.json file may support ref and sha for version pinning [1]. For security-constrained environments, administrators can use strictKnownMarketplaces in managed settings to restrict which marketplace sources are allowed [4][5].

Citations:


🌐 Web query:

Ponytail GitHub repository hooks files .github hooks installed

💡 Result:

Ponytail is a repository-based project that enhances AI coding assistants (such as Claude Code, GitHub Copilot CLI, and Qoder) by injecting rules, skills, and mode tracking [1][2]. It does not use standard Git hooks (which are stored in.git/hooks) [3][4], nor does it install its own hooks into a.github/hooks directory [5]. Instead, Ponytail uses "lifecycle hooks" defined within its own repository structure, typically located in a hooks/ directory [2][5]. These hooks are JSON configuration files or scripts (e.g., Node.js, PowerShell, or shell scripts) that specific AI agent platforms are instructed to load [2][5][6]. Regarding the.github/ folder: 1. Ponytail may utilize.github/copilot-instructions.md as part of its fallback, instruction-only mode for GitHub Copilot, which allows for always-on guidance without needing to install full plugin hooks [1][7][2]. 2. Standard GitHub Copilot hooks (distinct from Ponytail's internal logic) can be configured via.github/hooks/*.json, but Ponytail's specific implementation relies on being added as a plugin to the host agent (e.g., via codex plugin add or copilot plugin install) [6][8]. To set up Ponytail for full functionality, you generally run the install commands provided by your agent's marketplace (e.g., copilot plugin marketplace add DietrichGebert/ponytail) rather than manually placing files into.github/ [1][7][6]. You can review the repository's hooks/ directory to see the lifecycle events and scripts that the plugin utilizes [2][5].

Citations:


🌐 Web query:

site:code.claude.com/reference/extension lifecycle hooks Ponytail Claude Code

💡 Result:

The relevant Claude Code documentation is:

  • Hooks reference: lifecycle hooks, event schemas, matchers, input/output, async and HTTP hooks. [1]
  • Hooks guide: setup and examples for automating workflows. [2]
  • Extension overview: compares hooks with skills, subagents, MCP, and plugins. [3]

I couldn’t find a Claude Code concept or feature named “Ponytail” in the results.


🌐 Web query:

site:github.com/DietrichGebert/ponytail lifecycle hooks README Claude Code

💡 Result:

Claude Code supports a plugin-based architecture that utilizes lifecycle hooks, typically defined in a hooks/hooks.json file [1][2]. These hooks allow developers to trigger Node.js scripts in response to specific lifecycle events [3][4]. Key aspects of Claude Code lifecycle hooks include: - Configuration: Plugins define their hooks in a hooks.json file, which is automatically loaded by Claude Code [1][2]. This file maps lifecycle events to the corresponding executable commands [2][5]. - Supported Events: Common lifecycle events for plugins include SessionStart (triggered when a session begins) and UserPromptSubmit (triggered whenever a user submits a prompt) [2][5]. - Execution Requirements: Claude Code executes these hooks via a non-interactive shell [6][5]. Because these hooks often invoke Node.js scripts (e.g., ponytail-mode-tracker.js or ponytail-activate.js), the node runtime must be available on the non-interactive shell's PATH [3][6]. - Best Practices: - If node is not guaranteed to be on the PATH (such as in Nix or nvm environments), developers are advised to implement guards in their hook commands (e.g., command -v node >/dev/null 2>&1 && node "..." || exit 0) to allow the plugin to degrade gracefully without throwing errors on every prompt [6][5]. - Use ${CLAUDE_PLUGIN_ROOT} in hooks.json to correctly reference plugin files, as this variable is substituted by Claude Code at runtime [2]. - Plugin Integration: When developing or installing plugins like "ponytail," users may need to review and trust these hooks within the Claude Code environment to enable features like session activation, mode tracking, and statusline updates [3][1]. If a hook fails (e.g., due to a missing dependency or an issue parsing the prompt data), it may result in error messages during session startup or on every prompt submission [2][5]. Debugging often involves ensuring the hook script correctly parses the data.prompt object, especially if the command is dispatched as a skill rather than plain text [7][8].

Citations:


Pin the marketplace to a reviewed release.

extraKnownMarketplaces GitHub sources support ref; without it, refreshes will pull the repository default branch. Add a reviewed tag so marketplace code and lifecycle hooks cannot change without an explicit configuration update.

Proposed change
       "source": {
         "source": "github",
-        "repo": "DietrichGebert/ponytail"
+        "repo": "DietrichGebert/ponytail",
+        "ref": "<reviewed-release-tag>"
       }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/ai/claude/template/settings.json` around lines 168 - 173, Update the
ponytail entry in extraKnownMarketplaces by adding its reviewed GitHub release
tag as the source ref. Keep the existing repository configuration unchanged
otherwise, ensuring marketplace refreshes remain pinned until this configuration
is explicitly updated.

@hitsan
hitsan merged commit 2cf8a83 into main Aug 7, 2026
2 checks passed
@hitsan
hitsan deleted the feature/add-ponytail-plugin branch August 7, 2026 13:18
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