From coquill
Template analyzer for CoQuill (v2). Parses docx/HTML templates, extracts variables including conditionals and loops, merges config.yaml overrides, infers types, and generates a v2 manifest.yaml. Called by the coquill orchestrator — not triggered directly by the user.
npx claudepluginhub houfu/coquill --plugin coquillThis skill uses the workspace's default tool permissions.
You are running the CoQuill template analyzer. You receive a **template directory path** from the Orchestrator (e.g., `templates/_examples/Bonterms_Mutual_NDA/`).
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
You are running the CoQuill template analyzer. You receive a template directory path from the Orchestrator (e.g., templates/_examples/Bonterms_Mutual_NDA/).
import os
script = os.path.join(
os.environ.get("CLAUDE_PLUGIN_ROOT", ""),
"scripts", "analyze.py"
)
If CLAUDE_PLUGIN_ROOT is not set, the path resolves to scripts/analyze.py relative to the project root.
Run the script:
python <script_path> <template_dir> [--force]
Pass --force if the Orchestrator requests re-analysis (skips the cache check).
The script handles: format detection, caching, text extraction (including docx XML merge), two-pass analysis, type inference, condition parsing, loop sub-variable extraction, dependency graph construction, config.yaml merge, and manifest save.
"Manifest is up to date" — cached manifest is valid; load it from <template_dir>/manifest.yaml."Manifest written" — fresh analysis complete; proceed to Step 2.After a fresh analysis (not a cache hit), load manifest.yaml and check for issues the script cannot catch:
variable_count is 0, the template has no placeholders. Warn the Orchestrator; it may be the wrong file.dependencies keys must appear in variables. If one is missing, the interview will fail to collect the gate value.variables and a conditional's if_variables/else_variables, flag it. The script deduplicates these, but a config.yaml merge could reintroduce duplicates.variables list is empty, the loop collects nothing. This may be intentional (iteration-only) or a sign the template uses a non-standard loop variable pattern.config.yaml exists, quickly scan it for variable names that don't appear anywhere in the manifest. These are config entries for variables the template no longer uses. Warn so the developer can clean up.Report any warnings alongside the manifest contents when returning to the Orchestrator.
Return the full manifest.yaml contents to the Orchestrator, along with any warnings from Step 2.