Agent skill

Slab Generation

by Hello-QM in Hello-QM/catgo-LRG

A skill your agent uses when the user asks to generate a surface slab from a bulk crystal, specifying Miller indices, number of layers, vacuum thickness, or supercell size.

AGPL-3.0Auto-check passedDatabases

Install Slab Generation

skills CLI
$ npx skills add Hello-QM/catgo-LRG --skill slab-generation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Hello-QM/catgo-LRG slab-generation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Hello-QM/catgo-LRG.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/structure-slab .claude/skills/slab-generation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
slab-generation
GitHub stars
205
Token cost
~2k tokens
SKILL.md length
740 words
Files
1
Skills in repo
75
Repo updated
First seen
Licence
AGPL-3.0

At a glance

A skill your agent uses when the user asks to generate a surface slab from a bulk crystal, specifying Miller indices, number of layers, vacuum thickness, or supercell size.

  • Works in 5 steps: Fetch bulk crystal → Generate slab (interactive viewer) → PENDING_REVIEW -- verify the slab → …
  • The user asks to generate a surface slab from a bulk crystal
  • SKILL.md covers Overview, Task Type: slab_gen, Discussion Checkpoints and MCP Workflow, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Slab Generation is an agent skill from Hello-QM/catgo-LRG. Use when the user asks to generate a surface slab from a bulk crystal, specifying Miller indices, number of layers, vacuum thickness, or supercell size.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Database administration. The repository describes itself as: AI-driven workbench for computational materials science — interactive 3D structure viewer, natural-language CatBot assistant, visual DAG workflow engine, HPC job submission… The licence is AGPL-3.0.

When your agent uses it

  • The user asks to generate a surface slab from a bulk crystal
  • Specifying Miller indices
  • Number of layers
  • Vacuum thickness

Example prompts

  • “/slab-generation”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Fetch bulk crystal
  2. Generate slab (interactive viewer)
  3. PENDING_REVIEW -- verify the slab
  4. Make supercell for adsorbate calculations
  5. Submit geometry optimization

What it can do on your machine

Read from SKILL.md and the folder at commit fd6291b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json and python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Slab Generation loads about 2k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 740 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Hello-QM/catgo-LRG at commit fd6291b, republished under its AGPL-3.0 licence (© Hello-QM). 740 words, ~2,000 tokens.

Download SKILL.mdSave it as .claude/skills/slab-generation/SKILL.md (or your agent's skills folder).
name
slab-generation
description
Use when the user asks to generate a surface slab from a bulk crystal, specifying Miller indices, number of layers, vacuum thickness, or supercell size.

Slab Generation

Overview

A slab model represents a crystal surface: a finite number of atomic layers with vacuum above and below. Required for any surface chemistry calculation.

The slab_gen task type uses ferrox (Rust) generate_slab internally for fast slab cutting. The c axis of the output slab is always perpendicular to the ab plane (the surface plane).

Task Type: slab_gen

  • Type: slab_gen (local task, no HPC needed)
  • Engine: ferrox (Rust) surfaces.generate_slab
  • Outputs: structure (slab as JSON)
Parameters
ParameterTypeDefaultDescription
structureJSONrequiredBulk crystal structure input
millertuple(1, 1, 0)Miller index (h, k, l) for surface orientation
layersint4Number of atomic layers in the slab
vacuumfloat15.0Vacuum thickness in Angstroms
thicknessfloat10.0Minimum slab thickness in Angstroms
Miller Index Quick Reference
SurfaceMiller IndexStructure TypeCommon Use
FCC (111)(1,1,1)Close-packedPt, Pd, Au, Cu catalysis
FCC (100)(1,0,0)Square surfaceOpen face, higher activity
FCC (110)(1,1,0)Ridged surfaceStep edges
BCC (110)(1,1,0)Close-packedFe, W surfaces
BCC (100)(1,0,0)Open surfaceFe catalysis
Rutile (110)(1,1,0)Most stableTiO2, RuO2 catalysis
Perovskite (001)(0,0,1)AO or BO2 terminatedSrTiO3, LaCoO3

Discussion Checkpoints

🔴 Must discuss with user:

  • Miller index — determines surface orientation and active site geometry; e.g., FCC(111) is close-packed while (110) has ridged surface with step edges
  • Number of layers — too few layers (< 4) gives unconverged surface energy; production calculations need 5-6 layers minimum
  • Termination choice — critical for oxides (e.g., RuO2(110) O-terminated vs metal-terminated); wrong termination invalidates the surface chemistry model

🟡 Recommend confirming:

  • Vacuum thickness (default: 15 A) — increase to 20 A for charged surfaces or large dipole corrections; 12 A acceptable with LDIPOL
  • Supercell size — 1x1 slab has unphysical adsorbate-adsorbate interactions; expand to at least 2x2 for adsorbate studies
  • Fixed layers (default: freeze bottom 2) — adjust based on total slab thickness; for 6-layer slab, freeze bottom 3

🟢 Safe defaults:

  • c perpendicular to ab orientation (ferrox guarantees this)
  • Vacuum along c direction
  • layers = 4 for initial testing
  • vacuum = 15.0 A

MCP Workflow

Step 1: Fetch bulk crystal
json
{"tool": "catgo_fetch", "arguments": {
  "action": "crystal", "formula": "Pt", "provider": "mp"
}}
Step 2: Generate slab (interactive viewer)
json
{"tool": "catgo_structure", "arguments": {
  "action": "slab",
  "miller_index": [1, 1, 1],
  "min_slab_size": 12.0,
  "min_vacuum_size": 15.0
}}

If multiple terminations are returned, the tool lists them. Select the desired termination:

json
{"tool": "catgo_structure", "arguments": {
  "action": "slab",
  "miller_index": [1, 1, 1],
  "min_slab_size": 12.0,
  "min_vacuum_size": 15.0,
  "termination_index": 0
}}
Step 3: PENDING_REVIEW -- verify the slab

The user should inspect the slab before proceeding. Check:

  • Correct surface termination (especially for oxides)
  • Slab thickness is adequate (5+ layers for production)
  • No dangling bonds or polar surface artifacts
  • Vacuum gap is sufficient (15+ A)
json
{"tool": "catgo_view", "arguments": {"action": "get_state"}}
Step 4: Make supercell for adsorbate calculations

A 1x1 slab is usually too small (periodic image interactions). Expand to at least 2x2 in the surface plane. Never scale in z (vacuum direction):

json
{"tool": "catgo_structure", "arguments": {
  "action": "supercell",
  "scaling": [2, 2, 1]
}}
Step 5: Submit geometry optimization
json
{"tool": "catgo_workflow_engine", "arguments": {
  "action": "add_task",
  "params": {
    "task_type": "geo_opt",
    "software": "vasp",
    "ENCUT": 520,
    "freeze_mode": "layers",
    "freeze_layers": 2,
    "system_name": "Pt111_slab"
  }
}}

Python API

python
from catgo.workflow import Workflow

wf = Workflow("Pt(111) slab")

# Bulk input
inp = wf.add_task("structure_input", structure=pt_bulk_json)

# Cut slab using ferrox
slab = wf.add_task("slab_gen",
    structure=inp.output.structure,
    miller=(1, 1, 1),
    layers=4,
    vacuum=15.0,
    thickness=12.0)

# PENDING_REVIEW: user should check the slab before submitting geo_opt
# Verify correct termination, adequate thickness, and no polar artifacts

# Geometry optimization
opt = wf.add_task("geo_opt",
    structure=slab.output.structure,
    software="vasp",
    ENCUT=520,
    freeze_mode="layers",
    freeze_layers=2)

wf.submit()
Show full SKILL.md (300 more words)Show less

Workflow Engine (catgo_workflow) Batch Example

Using the graph-based workflow editor with batch operations:

json
{"tool": "catgo_workflow", "arguments": {
  "action": "batch",
  "workflow_id": "wf_123",
  "operations": [
    {"op": "add_node", "node_type": "slab_gen", "label": "slab1",
     "params": {"miller": [1, 1, 0], "layers": 4, "vacuum": 15.0}},
    {"op": "add_node", "node_type": "geo_opt", "label": "go1",
     "params": {"software": "vasp", "ENCUT": 520}},
    {"op": "connect", "from_id": "<structure_input_id>", "to_id": "slab1"},
    {"op": "connect", "from_id": "slab1", "to_id": "go1",
     "from_handle": "structure", "to_handle": "structure"}
  ]
}}

DAG Structure

bulk_crystal --> slab_gen --> [PENDING_REVIEW] --> geo_opt

Slab Thickness Guidelines

Applicationthickness (A)Approx. Layers (FCC)
Quick test8.03-4
Production adsorption12.05-6
Accurate work function15.07-8
Subsurface diffusion18.0+9+
Vacuum Thickness
  • 15 A minimum for standard DFT (prevents periodic image interaction)
  • 20 A for charged surfaces or large dipole corrections
  • With dipole correction (LDIPOL, IDIPOL=3): 12 A can be sufficient

Layer Freezing

For a 4-layer slab:

  • Layers 1-2 (bottom): freeze during geo_opt and freq
  • Layers 3-4 (top): free to relax

In VASP, constrained atoms use Selective Dynamics (T/F flags). CatGo handles this via freeze_mode="layers" in the geo_opt/freq task.

Oxide Slabs

For oxides (TiO2, RuO2, IrO2), the slab may have multiple terminations. For rutile (110):

  • O-terminated: bridging oxygen rows on surface (most common, most stable)
  • Metal-terminated: exposed cation rows (CUS sites)

Select based on experimental relevance and thermodynamic stability.

Common Pitfalls

  1. Always start from a BULK crystal. Cutting a slab from an already-cut slab produces garbage.
  2. The c axis is always perpendicular to the ab plane in the output slab. Vacuum is along the c direction. Never use supercell scaling in z (e.g., [2,2,2] would double the vacuum AND the slab, wasting compute).
  3. For non-cubic systems, verify the Miller index orientation is correct. Hexagonal systems use 3-index notation (h,k,l) not 4-index (h,k,i,l).
  4. Oxide slabs may be polar (e.g., ZnO(0001)). Polar slabs have a net dipole and require either reconstruction, passivation, or dipole correction. Check with catgo_view after generation.
  5. After supercell expansion, atom indices change. Re-identify surface atoms before placing adsorbates.
  6. For doped slabs, ALWAYS generate the slab from pristine bulk FIRST, then dope the slab. Doping bulk before slabbing replicates the dopant once per bulk repeat in slab thickness, giving unrealistically high concentrations.

© Hello-QM, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/structure-slab of Hello-QM/catgo-LRG.

Open the folder on GitHubat commit fd6291b

Compare with similar skills

Slab Generation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Slab Generation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Slab Generation this skillHello-QM/catgo-LRG205—~2kAutomated safety check: PassAGPL-3.0
Hybrid Cloud Outboxesgetsentry/sentry46k—~4.8kAutomated safety check: PassCustom licence
Replicate Video AdJingyi-Wu-Richael/replicate-video-ad1071 repos~1.6kAutomated safety check: PassNone
Sea Orm 2FlyinPancake/yoink112—~2.9kAutomated safety check: PassApache-2.0
Pixel Perfect ReplicationYu-369/VibeCurb979—~8.7kAutomated safety check: PassMIT
Horse Database PoolingHashLoad/horse1.4k—~1.4kAutomated safety check: PassMIT

Similar skills

  • Hybrid Cloud Outboxes

    getsentry/sentry

    Official

    Guide for creating and maintaining outbox-based eventually consistent operations in Sentry.

    46k GitHub stars~4.8k tokensUpdated today
    DatabasesAuto-check passed
  • Replicate Video Ad

    Jingyi-Wu-Richael/replicate-video-ad

    Analyze a reference video frame by frame and turn its visual grammar, story beats, dialogue, product reveal, proof sequence, and conversion structure into a production-ready ecommerce story-ad…

    107 GitHub starsUsed in 1 repo~1.6k tokens
    DatabasesAuto-check passed
  • Sea Orm 2

    FlyinPancake/yoink

    Expert guidance for SeaORM 2.0, Rust's async ORM with strongly-typed columns, nested ActiveModels, Entity Loader API, and entity-first workflow.

    112 GitHub stars~2.9k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Image-to-code replication pipeline. An agent skill from Yu-369/VibeCurb.

    979 GitHub stars~8.7k tokensUpdated 2 mo ago
    DatabasesAuto-check passed
  • Guide for setting up thread-safe database connection pooling (FireDAC / UniDAC) in multithreaded Horse applications.

    1.4k GitHub stars~1.4k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Redis Clustering

    redis/agent-skills

    Official

    Redis Cluster and replication guidance covering hash tags for multi-key operations, avoiding CROSSSLOT errors, and reading from replicas to scale read-heavy workloads.

    165 GitHub starsUsed in 1 repo~1k tokens
    DatabasesAuto-check passed

More from Hello-QM/catgo-LRG

All 75 skills in this repo
  • Campaign Md Orchestration

    Hello-QM/catgo-LRG

    Drive a file-first, agent-in-the-loop computational campaign via a folder + markdown tree (no DB).

    205 GitHub stars~1.6k tokensUpdated 16 days ago
    Auto-check passed
  • Lammps Deepmd

    Hello-QM/catgo-LRG

    Run LAMMPS molecular dynamics with DeePMD-kit machine learning potentials.

    205 GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Catgo Gibbs Pipeline

    Hello-QM/catgo-LRG

    Compute adsorption/reaction Gibbs free energies, free-energy diagrams, and electrochemical overpotentials (HER/ORR/OER/CO2RR/NRR) with VASP.

    205 GitHub stars~669 tokensUpdated 16 days ago
    Auto-check passed
  • Abinit

    Hello-QM/catgo-LRG

    Generate and manage ABINIT DFT calculations. An agent skill from Hello-QM/catgo-LRG.

    205 GitHub stars~963 tokensUpdated 16 days ago
    Auto-check passed
  • Adsorbate Placement

    Hello-QM/catgo-LRG

    A skill your agent uses when the user asks to place an adsorbate molecule on a surface, find adsorption sites, or set up a surface+adsorbate model for DFT.

    205 GitHub stars~3k tokensUpdated 16 days ago
    Auto-check passed
  • Adsorption Energy

    Hello-QM/catgo-LRG

    A skill your agent uses when the user asks for adsorption energy, binding energy, or wants to compare how strongly a molecule binds to a surface.

    205 GitHub stars~1.4k tokensUpdated 16 days ago
    Auto-check passed

Categories

Questions about Slab Generation

What does Slab Generation do?

A skill your agent uses when the user asks to generate a surface slab from a bulk crystal, specifying Miller indices, number of layers, vacuum thickness, or supercell size. Slab Generation is an agent skill from Hello-QM/catgo-LRG. Use when the user asks to generate a surface slab from a bulk crystal, specifying Miller indices, number of layers, vacuum thickness, or supercell size.

When should I use Slab Generation?

Slab Generation fits situations like: the user asks to generate a surface slab from a bulk crystal; specifying Miller indices; number of layers; vacuum thickness.

How do I install Slab Generation in Claude Code?

Run `npx skills add Hello-QM/catgo-LRG --skill slab-generation -a claude-code`. Or copy the skill folder (.claude/skills/structure-slab in Hello-QM/catgo-LRG) into .claude/skills/slab-generation in your project. Claude Code loads it when a task matches its description.

How do I install Slab Generation in Codex?

Run `npx skills add Hello-QM/catgo-LRG --skill slab-generation -a codex`. Or copy the skill folder (.claude/skills/structure-slab in Hello-QM/catgo-LRG) into .agents/skills/slab-generation in your project. Codex loads it when a task matches its description.

Can I use Slab Generation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Hello-QM/catgo-LRG --skill slab-generation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/slab-generation, .gemini/skills/slab-generation, .github/skills/slab-generation and .opencode/skills/slab-generation in your project.

What does Slab Generation need to run?

SKILL.md names no scripts, command-line tools or credentials: Slab Generation is instructions for the agent only. Our summary lists: Python 3.

Does Slab Generation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Slab Generation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Slab Generation use?

Slab Generation is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Slab Generation use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Slab Generation?

Skills that share tags, products or a category with Slab Generation: Hybrid Cloud Outboxes (getsentry/sentry, 46k stars), Replicate Video Ad (Jingyi-Wu-Richael/replicate-video-ad, 107 stars), Sea Orm 2 (FlyinPancake/yoink, 112 stars) and Pixel Perfect Replication (Yu-369/VibeCurb, 979 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Slab Generation?

Hello-QM (a GitHub user) maintains it in Hello-QM/catgo-LRG, which has 205 GitHub stars. The repository holds 75 skills in this directory. The repository was last updated on September 22, 2026.

Source: Hello-QM/catgo-LRG on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.