ask
Read first (if ${CLAUDE_PLUGIN_ROOT} is empty, the plugin root is two
levels above this skill's base directory): ${CLAUDE_PLUGIN_ROOT}/skills/_shared/rules.md
and ${CLAUDE_PLUGIN_ROOT}/skills/_shared/model.md (what the model's fields mean).
Find the workspace (rules.md). The question is the text after
/open-erd:ask; none → ask for it.
Read <ws>/open-erd.yaml and <ws>/model/*.yaml only. Use what the
model records: table, column, enum and domain notes, enum meanings,
relations (with cardinality, optional, kind, review), polymorphic
entries. Do not open source code, extract scripts or facts files, and run
no engine command.
Answer in the user's language, short, for a reader who does not read
code:
- Answer: a few sentences or steps.
- Based on: each table, column and relation used, by model id
(
<db>.<schema>.<table>, <table id>.<column>,
<from table>.<columns> -> <to table>.<columns>). Say when one is
inferred, review: pending or stale: it is not confirmed.
- Open in the ERD: one link,
file://<ws>/out/erd.svg#<link> (a
space in <ws> written %20), where <link> is
path=<id>,<id>,... when the question is how two things are linked:
the tables in walking order (the viewer finds the relations between
neighbours);
tables=<id>,<id>,... otherwise: the tables the answer names.
When the model does not hold the answer (no note or relation says it),
say so plainly, say what is missing, and suggest /open-erd:sync if the
code may have changed since. Do not guess from table names alone, and
read source code only when the user asks for it.
Check the link opens the current drawing:
ls <ws>/out/erd.svg && find <ws>/model <ws>/open-erd.yaml <ws>/layout.json -newer <ws>/out/erd.svg
out/erd.svg missing, or any path printed (the model changed after the
last render) → say the drawing is out of date and suggest
/open-erd:sync (it redraws the files); do not render unasked.
5. Write nothing: no workspace file, no commit.
6. End with the feedback line.
1---2name: ask3argument-hint: '"<question about the data>"'4description: Answer a business or structural question about a project's data (which tables hold what, how two things are linked, what a status means) from its open-erd model alone, naming the tables, columns and relations the answer relies on and giving a link that opens them highlighted in out/erd.svg. Reads no source code and writes no files. Use when the user types /open-erd:ask "<question>" or asks how data in an open-erd workspace fits together.5metadata:6 source: https://skillmd.com/skills/tomosia-vietnam/ask7---89# ask1011Read first (if `${CLAUDE_PLUGIN_ROOT}` is empty, the plugin root is two12levels above this skill's base directory): `${CLAUDE_PLUGIN_ROOT}/skills/_shared/rules.md`13and `${CLAUDE_PLUGIN_ROOT}/skills/_shared/model.md` (what the model's fields mean).14151. Find the workspace (rules.md). The question is the text after16 `/open-erd:ask`; none → ask for it.172. Read `<ws>/open-erd.yaml` and `<ws>/model/*.yaml` only. Use what the18 model records: table, column, enum and domain notes, enum meanings,19 relations (with `cardinality`, `optional`, `kind`, `review`), polymorphic20 entries. Do not open source code, extract scripts or facts files, and run21 no engine command.223. Answer in the user's language, short, for a reader who does not read23 code:24 - **Answer**: a few sentences or steps.25 - **Based on**: each table, column and relation used, by model id26 (`<db>.<schema>.<table>`, `<table id>.<column>`,27 `<from table>.<columns> -> <to table>.<columns>`). Say when one is28 `inferred`, `review: pending` or `stale`: it is not confirmed.29 - **Open in the ERD**: one link, `file://<ws>/out/erd.svg#<link>` (a30 space in `<ws>` written `%20`), where `<link>` is31 - `path=<id>,<id>,...` when the question is how two things are linked:32 the tables in walking order (the viewer finds the relations between33 neighbours);34 - `tables=<id>,<id>,...` otherwise: the tables the answer names.3536 When the model does not hold the answer (no note or relation says it),37 say so plainly, say what is missing, and suggest `/open-erd:sync` if the38 code may have changed since. Do not guess from table names alone, and39 read source code only when the user asks for it.404. Check the link opens the current drawing:4142```bash43ls <ws>/out/erd.svg && find <ws>/model <ws>/open-erd.yaml <ws>/layout.json -newer <ws>/out/erd.svg44```4546 `out/erd.svg` missing, or any path printed (the model changed after the47 last render) → say the drawing is out of date and suggest48 `/open-erd:sync` (it redraws the files); do not render unasked.495. Write nothing: no workspace file, no commit.506. End with the feedback line.