Meta-prompt refinement via local LLM — transforms casual prompts into structured, rules-aware agent instructions
Disable restruct prompt refinement. Prompts pass through to Claude without local LLM preprocessing.
Enable restruct prompt refinement. Re-enables the local LLM preprocessing of prompts.
Generate a minimal, research-backed CLAUDE.md for this project. Analyzes the codebase for non-obvious commands and conventions, interviews you for team knowledge, and produces a concise file that stays under 30 rules.
Manually refine a prompt through the local LLM meta-prompt pipeline. Transforms a casual developer request into a structured, rules-aware prompt using a local Ollama model. Only works when features.refinement is enabled in config.yaml.
Review tool permission decisions across sessions and propose auto-approval rules. Analyzes which tools the user consistently approves, then suggests additions to .restruct/permissions.yaml to eliminate repetitive permission dialogs.
Matches all tools
Hooks run on every tool call, not just specific ones
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Monorepo for the restruct Claude Code plugin — a local-LLM meta-prompt refinement system plus a tool permissions, verification, and rule-bootstrapping stack.
Looking for install / usage docs? See
plugin/README.md. This README is for contributors to the monorepo.
.
├── cli/ Go CLI (the `restruct` binary)
│ ├── cmd/ Cobra command definitions
│ ├── internal/ Packages: pipeline, bootstrap, verify, permit, config, db, ...
│ └── main.go
├── web/ React 19 + Vite dashboard (embedded into the binary on release)
├── plugin/ The shippable plugin artifact — binaries, skills, plugin.json
│ ├── bin/ Cross-compiled restruct binaries (committed)
│ ├── skills/ Markdown skill definitions
│ └── .claude-plugin/ plugin.json + marketplace.json
├── docs/ PRD, milestones, architecture and API reference
└── xmake.lua Build configuration (xmake + phony Go targets)
All commands run from the repo root. Never cd into cli/ or web/ — it breaks
session CWD and causes hooks to miss CLAUDE.md.
pnpm dev # xmake watch + Vite HMR + docs server
pnpm build # release build: xmake → Go cross-compile → plugin/bin/
pnpm test # all Go tests via pnpm workspaces
pnpm --filter @restruct/cli test # only Go tests
pnpm --filter web lint # lint web TS
pnpm --filter web exec tsc --noEmit # type-check web
pnpm clean # xmake clean
Run a single Go test:
pnpm --filter @restruct/cli exec go test ./internal/pipeline/ -run TestRefine -v
restruct binary is the interface
for every hook operation.//go:build debug); release builds embed the web
dist via go:embed.Full architecture reference: docs/reference/ARCHITECTURE.md.
Research and design rationale: docs/PRD.md.
The plugin ships as a self-contained directory (plugin/) that Claude Code installs
from a marketplace URL or local path. Platform binaries are built and pushed by CI —
they are not committed manually.
version in plugin/.claude-plugin/plugin.json.git tag v<version> && git push --tags.Build workflow (.github/workflows/build.yml) runs on the tag:
pnpm install --frozen-lockfilepnpm build — produces the cross-compiled platform binaries:
plugin/bin/restruct-darwin-arm64plugin/bin/restruct-darwin-x86_64plugin/bin/restruct-linux-x86_64git add -f plugin/bin/restruct-* (the -f bypasses the gitignore that
excludes platform binaries in normal dev)build: release binaries for v<version> and pushes to main/plugin marketplace add thejustinwalsh/claude-plugins
then /plugin install restruct@thejustinwalsh and get the CI-built binaries.For local development, pnpm build produces the same binaries in plugin/bin/ but
they stay ignored by git — only the plugin/bin/restruct shell shim is tracked.
You can also manually trigger the Build workflow via workflow_dispatch without
a tag if you need to refresh the published binaries outside a release.
modernc.org/sqlite for cross-compilation.set_languages("go") is broken for Go 1.20+. Use phony targets with
direct go build (see xmake/phony.lua and xmake/go_build.lua).as type assertions. Fix the types instead.Conventional commits. Prompt versions tracked in cli/internal/prompt/versions/.
Add tests for new behavior — prefer focused unit tests in internal/ packages over
broad integration tests. When fixing a bug, add a regression test before fixing.
See CLAUDE.md for the full set of development conventions, and
web/CLAUDE.md for frontend-specific rules.
See LICENSE (or the LICENSE file in plugin/ for the shipped artifact).
npx claudepluginhub thejustinwalsh/claude-plugins --plugin restructNative macOS notifications for Claude Code with Ghostty tab focusing
27-framework prompt engineering skill for analyzing and improving prompts across 7 intent categories
Testany AI/LLM 工具集:Prompt 优化
18 universal AI skills for Claude Code — skill creation, deep research, strategic planning, content processing, solution architecture, and orchestration workflows
Write prompts, system instructions, agent directives, and skill descriptions using two stacked layers: outcome-first (goal, success criteria, stopping condition) plus directional language (every sentence names the path with positive verbs).
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Memory compression system for Claude Code - persist context across sessions