Skip to content

feat: add claude plugins for sandbox config and troubleshooting - #134

Merged
zekker6 merged 3 commits into
mainfrom
skils-plugin
Aug 16, 2026
Merged

feat: add claude plugins for sandbox config and troubleshooting#134
zekker6 merged 3 commits into
mainfrom
skils-plugin

Conversation

@zekker6

@zekker6 zekker6 commented Aug 16, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings August 16, 2026 10:57

Copilot AI 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.

Pull request overview

Adds Claude Code plugin packaging to devsandbox by introducing a configuration skill plugin and a PostToolUse triage hook plugin, along with repository docs/metadata and a test task to keep the bundled plugins from drifting from devsandbox behavior and documentation.

Changes:

  • Add Claude plugin marketplace metadata plus two plugins: devsandbox-config (docs-grounded config skill) and devsandbox-triage (signature-based failure explainer hook).
  • Add plugin checks to task test (triage behavioral tests + validate docs URL → source file mapping).
  • Document the plugins in README and record the change in the changelog.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Taskfile.yaml Runs plugin checks as part of the main test task.
README.md Documents how to install and what the plugins do.
CHANGELOG.md Records the new plugin marketplace capability under Unreleased.
.claude-plugin/marketplace.json Declares the repo as a Claude Code plugin marketplace and lists the plugins.
.claude-plugin/devsandbox-triage/scripts/triage.sh Implements the PostToolUse hook that matches known devsandbox restriction signatures.
.claude-plugin/devsandbox-triage/scripts/triage_test.sh Adds behavioral tests to prevent signature drift.
.claude-plugin/devsandbox-triage/README.md Documents the triage plugin behavior and requirements.
.claude-plugin/devsandbox-triage/hooks/hooks.json Registers the PostToolUse hook command and timeout.
.claude-plugin/devsandbox-triage/.claude-plugin/plugin.json Plugin metadata for devsandbox-triage.
.claude-plugin/devsandbox-config/skills/devsandbox-config/SKILL.md Adds the docs-grounded configuration skill definition and usage guidance.
.claude-plugin/devsandbox-config/.claude-plugin/plugin.json Plugin metadata for devsandbox-config.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +12 to +21
if ! command -v jq >/dev/null 2>&1; then
# A hook that cannot parse its input must say so once rather than fail
# silently, but it runs on every Bash call, so the notice is stamped.
marker="${CLAUDE_PLUGIN_DATA:-}/jq-missing-reported"
if [ -z "${CLAUDE_PLUGIN_DATA:-}" ] || [ ! -e "$marker" ]; then
[ -n "${CLAUDE_PLUGIN_DATA:-}" ] && mkdir -p "${CLAUDE_PLUGIN_DATA}" 2>/dev/null && : >"$marker"
printf '%s\n' '{"systemMessage":"devsandbox-triage: jq is not on PATH, so sandbox error triage is disabled. Install jq to enable it."}'
fi
exit 0
fi
Comment on lines +23 to +27
tool=$(jq -r '.tool_name // ""' <<<"$payload")
[ "$tool" = "Bash" ] || exit 0

cmd=$(jq -r '.tool_input.command // ""' <<<"$payload")
out=$(jq -r '.tool_output | if type == "object" then (.text // tostring) else (. // "" | tostring) end' <<<"$payload")
Copilot AI review requested due to automatic review settings August 16, 2026 11:15

Copilot AI 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.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

Suppressed comments (2)

.claude-plugin/devsandbox-triage/scripts/triage.sh:30

  • When jq is missing, the marker is created under ${TMPDIR:-/tmp} by default. In a shared, world-writable temp directory this creates a TOCTOU window between the -e check and : >"$marker", allowing another local user to race in a symlink and potentially redirect the write (as the current user). Prefer a per-user, non-world-writable state directory fallback instead of /tmp when CLAUDE_PLUGIN_DATA is unset.
	dir="${CLAUDE_PLUGIN_DATA:-${TMPDIR:-/tmp}}"
	marker="$dir/devsandbox-triage-jq-missing.${UID:-0}"
	if [ ! -e "$marker" ]; then
		mkdir -p "$dir" 2>/dev/null
		: >"$marker" 2>/dev/null
		printf '%s\n' '{"systemMessage":"devsandbox-triage: jq is not on PATH, so sandbox error triage is disabled. Install jq to enable it."}'

Taskfile.yaml:103

  • The docs-URL mapping check can pass even if the SKILL.md file is missing/unreadable: grep ... "$skill" failing results in an empty for list and missing stays 0, so the task exits successfully while the plugin is broken.
      - |
        skill=.claude-plugin/devsandbox-config/skills/devsandbox-config/SKILL.md
        missing=0
        for path in $(grep -oE 'docs/[a-z0-9][a-z0-9/-]*/' "$skill" | sed -E 's,^docs/,,; s,/$,,' | sort -u); do
          if [ -f "docs/$path.md" ]; then

Copilot AI review requested due to automatic review settings August 16, 2026 11:31

Copilot AI 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.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

Suppressed comments (1)

.claude-plugin/devsandbox-triage/scripts/triage.sh:31

  • The jq-missing marker write has a TOCTOU window and can follow a pre-created symlink (e.g., in /tmp) because it checks -e and then truncates the path. This is avoidable by using an atomic create with noclobber (and dropping the separate existence check), which also keeps the “print once” behavior.
	dir="${CLAUDE_PLUGIN_DATA:-${TMPDIR:-/tmp}}"
	marker="$dir/devsandbox-triage-jq-missing.${UID:-0}"
	if [ ! -e "$marker" ]; then
		mkdir -p "$dir" 2>/dev/null
		: >"$marker" 2>/dev/null
		printf '%s\n' '{"systemMessage":"devsandbox-triage: jq is not on PATH, so sandbox error triage is disabled. Install jq to enable it."}'
	fi
	exit 0

@zekker6
zekker6 merged commit fd29d03 into main Aug 16, 2026
5 checks passed
@zekker6
zekker6 deleted the skils-plugin branch August 16, 2026 11:37
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