Skip to content

Add Codex skill with usage guidance and drawing templates#30

Open
Qxy0happy wants to merge 2 commits into
Typsium:masterfrom
Qxy0happy:codex-alchemist-skill
Open

Add Codex skill with usage guidance and drawing templates#30
Qxy0happy wants to merge 2 commits into
Typsium:masterfrom
Qxy0happy:codex-alchemist-skill

Conversation

@Qxy0happy

Copy link
Copy Markdown

Closes #29

Adds a Codex skill at .agents/skills/alchemist/\ to help AI assistants provide accurate guidance for drawing chemical skeletal formulas with the alchemist Typst package.

Changes:

  • .agents/skills/alchemist/SKILL.md\ — Complete usage guide for all alchemist features
  • .agents/skills/alchemist/agents/openai.yaml\ — Skill metadata for auto-discovery
  • .agents/skills/alchemist/references/api.md\ — Full API reference
  • .agents/skills/alchemist/references/patterns.md\ — 15 molecule drawing templates

The skill uses progressive disclosure: the SKILL.md covers the core workflow and points to reference files that load on demand when Codex needs deeper API details or ready-made patterns to adapt.

Add a Codex skill at .agents/skills/alchemist/ with:
- SKILL.md: full usage guide for the alchemist Typst package
- agents/openai.yaml: skill metadata for auto-discovery
- references/api.md: complete API reference
- references/patterns.md: 15 molecule drawing templates
Copilot AI review requested due to automatic review settings June 7, 2026 03:33

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds an “alchemist” skill package with reference documentation and agent metadata to help generate Typst chemical structure drawings using the @preview/alchemist package.

Changes:

  • Added a new “Drawing Patterns” reference with common molecule templates.
  • Added an API reference documenting core functions, links, configuration defaults, and bindings.
  • Added skill metadata (SKILL.md) and an OpenAI agent interface descriptor (openai.yaml).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
.agents/skills/alchemist/references/patterns.md New cookbook-style Typst snippets for drawing common structures with alchemist.
.agents/skills/alchemist/references/api.md New API reference and default configuration documentation for alchemist.
.agents/skills/alchemist/agents/openai.yaml Declares agent display name/description/default prompt for the skill.
.agents/skills/alchemist/SKILL.md Skill overview and usage guide linking to the reference docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


## Core functions

### `skeletize(debug, background, config, body)`

## Fragment

### `fragment(mol, name, links, lewis, vertical, ignore-charge, colors)`

```typ
#skeletize({
fragment(name: "main", "C")

```typ
#skeletize({
fragment(name: "A", "A")
fragment("B")
branch({
single()
fragment(name: "X", "X")

```typ
#skeletize({
fragment(name: "A", "A")
single()
fragment("B")
single()
fragment(name: "C", "C", links: (
Comment on lines +130 to +137
parenthesis(
l: "[", r: "]",
br: $n$, {
single(angle: 1)
single(angle: -1)
single(angle: 1)
}
)
Comment thread .agents/skills/alchemist/SKILL.md Outdated
|---|---|
| `fragment(mol, name:, links:, lewis:, ...)` | A chemical symbol / group. String notation: `"C_6H_12O_6"`, `"Fe^{2+}"`, `$CH_4$` (equation) |
| `hook(name)` | Named anchor point for links |
| `single(double, triple, ...)` | Bond between fragments — see Links section |
@Robotechnic

Copy link
Copy Markdown
Collaborator

There are multiple issues in the skill api (cf copilot comments and mine) and the ai is doing some anti-paterns. Can you fix the issues?
Thanks for the contribution.

- Fix function signatures in api.md to use named-arg notation
  (colons) for named parameters and clarify positional args
- Fix argument ordering in patterns.md examples:
  positional args before named args
- Fix misleading single(double, triple, ...) table entry in
  SKILL.md to list link functions as alternatives

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Add Codex skill for alchemist usage guidance

3 participants