Set up ast-grep for a codebase with common TypeScript rules for detecting anti-patterns, enforcing best practices, and preventing bugs.

MITAuto-check passedDevelopment

Install Ast Grep Setup

skills CLI
$ npx skills add alchemiststudiosDOTai/harness-engineering --skill ast-grep-setup -a claude-code

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

GitHub CLI
$ gh skill install alchemiststudiosDOTai/harness-engineering ast-grep-setup --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/alchemiststudiosDOTai/harness-engineering.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/ast-grep-setup .claude/skills/ast-grep-setup && 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
ast-grep-setup
GitHub stars
105
Token cost
~4.7k tokens
SKILL.md length
581 words
Files
13 (incl. scripts)
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Set up ast-grep for a codebase with common TypeScript rules for detecting anti-patterns, enforcing best practices, and preventing bugs.

  • Works in 9 steps: Initialize ast-grep Configuration → Add Rules for Common TypeScript Pain… → Run and Test → …
  • Adding structural linting
  • SKILL.md covers When to Use, CRITICAL: Read YAML Structure…, Quick Start and Rule Library, plus 5 more sections
  • Runs Python scripts from its folder; calls python3 and node

What it does

Ast Grep Setup is an agent skill from alchemiststudiosDOTai/harness-engineering. Set up ast-grep for a codebase with common TypeScript rules for detecting anti-patterns, enforcing best practices, and preventing bugs. Creates sgconfig.yml, rule files, and rule tests. Use when adding structural linting, banning legacy patterns, or implementing ratchet gates.

Its SKILL.md is about 4.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 16 other files, including scripts (for example `scripts/validate-rule.py`, `templates/rule-tests/no-console-log-test.yml` and `templates/rule-tests/no-debugger-test.yml`).

It sits in Development, covering Linting and formatting. It works with TypeScript. The repository describes itself as: harness-engineering discussion of shortcuts, automation, hacks and overall productivity with code agents like claude code, codex, and other harness. The licence is MIT.

When your agent uses it

  • Adding structural linting
  • Banning legacy patterns
  • Implementing ratchet gates

Example prompts

  • “/ast-grep-setup”

Requirements

  • Python 3
  • Node.js

Workflow steps

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

  1. Initialize ast-grep Configuration
  2. Add Rules for Common TypeScript Pain Points
  3. Run and Test
  4. constraints Goes at TOP LEVEL
  5. No Duplicate Keys in YAML
  6. Proper all: / any: Structure
  7. Top-Level Rule File Structure
  8. Validate Before Running
  9. Common Error Messages

What it can do on your machine

Read from SKILL.md and the folder at commit 7a9fa15. 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

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • node

    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

Ast Grep Setup loads about 4.7k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 581 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from alchemiststudiosDOTai/harness-engineering at commit 7a9fa15, republished under its MIT licence (© alchemiststudiosDOTai). 581 words, ~4,671 tokens.

Download SKILL.mdSave it as .claude/skills/ast-grep-setup/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
ast-grep-setup
description
Set up ast-grep for a codebase with common TypeScript rules for detecting anti-patterns, enforcing best practices, and preventing bugs. Creates sgconfig.yml, rule files, and rule tests. Use when adding structural linting, banning legacy patterns, or implementing ratchet gates.

ast-grep Setup Skill

Set up ast-grep with common TypeScript rules for detecting anti-patterns, enforcing best practices, and preventing bugs.

When to Use

  • Adding structural linting to a TypeScript codebase
  • Banning legacy patterns after migration
  • Implementing ratchet gates (block new violations while grandfathering existing ones)
  • Enforcing architecture boundaries
  • Preventing common TypeScript/JavaScript bugs

CRITICAL: Read YAML Structure First

Agents: Before writing any rules, read the YAML Structure Rules section.

The most common mistakes are:

  1. Putting constraints inside rule: (must be at top level)
  2. Duplicate YAML keys like multiple not: blocks
  3. Not wrapping multiple conditions in all: or any:

Use the validation script to catch these before running ast-grep:

bash
python3 scripts/validate-rule.py rules/*.yml

Quick Start

1. Initialize ast-grep Configuration
bash
# Create sgconfig.yml in project root
mkdir -p rules/ast-grep/rules rules/ast-grep/rule-tests
cat > rules/ast-grep/sgconfig.yml << 'EOF'
ruleDirs:
  - rules
testConfigs:
  - testDir: rule-tests
    allowedFixers: []
EOF
2. Add Rules for Common TypeScript Pain Points

See the Rule Library below for ready-to-use rules.

3. Run and Test
bash
# Scan the codebase
cd rules/ast-grep && ast-grep scan

# Run rule tests
cd rules/ast-grep && ast-grep test

# Update test snapshots after rule changes
cd rules/ast-grep && ast-grep test -U

Rule Library

Type Safety Rules
no-implicit-any-params

Prevents function parameters without explicit types (implicit any).

yaml
# rules/no-implicit-any-params.yml
id: no-implicit-any-params
language: TypeScript
severity: warning
message: "Parameter '$PARAM' lacks explicit type annotation"
files:
  - src/**/*.ts
  - src/**/*.tsx
rule:
  pattern: function $FUNC($PARAM) { $$$BODY }
constraints:
  PARAM:
    not:
      has:
        kind: type_annotation
no-unsafe-any-usage

Bans direct property access on any typed values.

yaml
# rules/no-unsafe-any-usage.yml
id: no-unsafe-any-usage
language: TypeScript
severity: error
message: "Unsafe property access on 'any' type. Cast or add type guard."
rule:
  pattern: $EXPR.$PROP
constraints:
  EXPR:
    typeAnnotation: any
Async/Await Rules
no-floating-promises

Prevents unhandled promises that could fail silently.

yaml
# rules/no-floating-promises.yml
id: no-floating-promises
language: TypeScript
severity: error
message: "Promise is not awaited, returned, or handled with .catch()"
files:
  - src/**/*.ts
  - src/**/*.tsx
ignores:
  - new Promise($$$)
  - Promise.$FUNC($$$)
rule:
  all:
    - pattern: $PROMISE_FUNC($$$ARGS)
    - has:
        kind: call_expression
        pattern: $PROMISE_FUNC($$$ARGS)
    - not:
        inside:
          kind: await_expression
          stopBy: end
    - not:
        inside:
          kind: return_statement
          stopBy: end
    - not:
        inside:
          kind: call_expression
          pattern: $$$.catch($$$)
          stopBy: end
constraints:
  PROMISE_FUNC:
    regex: (fetch|axios\.[a-z]+|async|\.then)
no-missing-await

Detects async function calls without await.

yaml
# rules/no-missing-await.yml
id: no-missing-await
language: TypeScript
severity: warning
message: "Async function '$FUNC' called without await"
files:
  - src/**/*.ts
  - src/**/*.tsx
rule:
  all:
    - pattern: $FUNC($$$ARGS)
    - not:
        inside:
          kind: await_expression
          stopBy: end
    - not:
        inside:
          kind: return_statement
          stopBy: end
constraints:
  FUNC:
    typeAnnotation: /^Promise</
Error Handling Rules
no-empty-catch

Bans empty catch blocks that swallow errors.

yaml
# rules/no-empty-catch.yml
id: no-empty-catch
language: TypeScript
severity: error
message: "Empty catch block silently swallows errors. Log or re-throw."
files:
  - src/**/*.ts
  - src/**/*.tsx
rule:
  all:
    - pattern: try { $$$TRY } catch ($ERROR) { $$$CATCH }
    - not:
        has:
          kind: statement
          inside:
            kind: catch_clause
            pattern: $$$CATCH

#### require-error-logging
Requires error logging in catch blocks.

```yaml
# rules/require-error-logging.yml
id: require-error-logging
language: TypeScript
severity: warning
message: "Catch block should log the error"
files:
  - src/**/*.ts
  - src/**/*.tsx
rule:
  all:
    - pattern: try { $$$TRY } catch ($ERR) { $$$CATCH }
    - not:
        has:
          kind: call_expression
          pattern: console.$LOG($ERR)
          inside:
            kind: catch_clause
            pattern: $$$CATCH
    - not:
        has:
          kind: call_expression
          pattern: logger.$LOG($ERR)
          inside:
            kind: catch_clause
            pattern: $$$CATCH
React Rules
no-use-effect-missing-deps

Flags useEffect hooks that might be missing dependencies.

yaml
# rules/no-use-effect-missing-deps.yml
id: no-use-effect-missing-deps
language: TypeScript
severity: warning
message: "useEffect has an empty dependency array but references external values"
files:
  - src/**/*.tsx
rule:
  pattern: useEffect($FUNC, [])
constraints:
  FUNC:
    has:
      kind: identifier
      pattern: $ID
      not:
        pattern: console
no-direct-state-mutation

Prevents direct state mutation in React.

yaml
# rules/no-direct-state-mutation.yml
id: no-direct-state-mutation
language: TypeScript
severity: error
message: "Do not mutate state directly. Use the setter function."
files:
  - src/**/*.tsx
rule:
  all:
    - pattern: $STATE.$PROP = $VAL
    - has:
        kind: identifier
        pattern: $STATE
        regex: ^set[A-Z]
Performance Rules
no-array-reduce-for-objects

Warns about using reduce to build objects (often less readable).

yaml
# rules/no-array-reduce-for-objects.yml
id: no-array-reduce-for-objects
language: TypeScript
severity: warning
message: "Consider using Object.fromEntries() or a for...of loop instead of reduce for building objects"
files:
  - src/**/*.ts
  - src/**/*.tsx
rule:
  pattern: $ARR.reduce(($ACC, $ITEM) => { $$$BODY; return $ACC; }, {})
no-regex-in-loop

Prevents regex creation inside loops (compiles on each iteration).

yaml
# rules/no-regex-in-loop.yml
id: no-regex-in-loop
language: TypeScript
severity: warning
message: "Creating regex inside loop - move outside or use constant"
files:
  - src/**/*.ts
  - src/**/*.tsx
rule:
  inside:
    kind: for_statement
    stopBy: end
  pattern: /$PAT/
Architecture Rules
no-cross-module-imports

Enforces module boundaries (customize for your architecture).

yaml
# rules/no-cross-module-imports.yml
id: no-cross-module-imports
language: TypeScript
severity: error
message: "Domain modules should not import from other domain modules directly"
files:
  - src/domain/**/*.ts
rule:
  all:
    - pattern: import $$$ from "$MOD"
    - matches:
        source: $MOD
        contains: /domain/
no-node-in-frontend

Prevents Node.js modules from being imported in frontend code.

yaml
# rules/no-node-in-frontend.yml
id: no-node-in-frontend
language: TypeScript
severity: error
message: "Node.js built-in modules cannot be used in frontend code"
files:
  - src/frontend/**/*.ts
  - src/frontend/**/*.tsx
  - src/client/**/*.ts
  - src/client/**/*.tsx
rule:
  all:
    - pattern: import $$$ from "$MOD"
    - matches:
        source: $MOD
        regex: ^(fs|path|os|crypto|http|https|net|dgram|dns|cluster|module|vm|child_process|worker_threads)$
Best Practice Rules
no-console-log

Prevents console.log in production code (use a logger instead).

yaml
# rules/no-console-log.yml
id: no-console-log
language: TypeScript
severity: warning
message: "Use a proper logger instead of console.log"
files:
  - src/**/*.ts
  - src/**/*.tsx
ignores:
  - "**/*.test.ts"
  - "**/*.spec.ts"
  - "**/__tests__/**"
rule:
  pattern: console.log($$$ARGS)
no-debugger

Prevents debugger statements.

yaml
# rules/no-debugger.yml
id: no-debugger
language: TypeScript
severity: error
message: "Remove debugger statement before committing"
files:
  - src/**/*.ts
  - src/**/*.tsx
rule:
  pattern: debugger;
prefer-const-over-let

Suggests const when variable is never reassigned.

yaml
# rules/prefer-const-over-let.yml
id: prefer-const-over-let
language: TypeScript
severity: hint
message: "Consider using 'const' since this variable is never reassigned"
files:
  - src/**/*.ts
  - src/**/*.tsx
rule:
  all:
    - pattern: let $VAR = $INIT
    - not:
        follows:
          pattern: $VAR = $NEWVAL
          stopBy: end

Rule Tests

Each rule should have a corresponding test file:

Example: no-floating-promises-test.yml
yaml
id: no-floating-promises
valid:
  - |
    const result = await fetch('/api/users');
  - |
    return fetch('/api/users');
  - |
    fetch('/api/users').catch(err => console.error(err));
  - |
    new Promise((resolve) => setTimeout(resolve, 1000));
  - |
    Promise.all([fetch('/a'), fetch('/b')]);
invalid:
  - |
    function getUsers() {
      fetch('/api/users');
    }
  - |
    async function load() {
      fetch('/api/data');
    }

Advanced Patterns

Ratchet Mode: Allow Existing Violations

To implement a ratchet (block new violations while allowing existing ones):

bash
# 1. Generate baseline of current violations
ast-grep scan --json > baseline/violations.json

# 2. Create baseline extractor script
cat > tools/ast-grep/baseline-check.sh << 'SCRIPT'
#!/bin/bash
# Check only new violations against baseline
ast-grep scan --json | node -e '
const baseline = require("./baseline/violations.json");
const current = JSON.parse(require("fs").readFileSync(0, "utf-8"));
const baselineSet = new Set(baseline.map(v => `${v.file}:${v.line}:${v.ruleId}`));
const newViolations = current.filter(v => !baselineSet.has(`${v.file}:${v.line}:${v.ruleId}`));
if (newViolations.length > 0) {
  console.error("New violations found:");
  newViolations.forEach(v => console.error(`${v.file}:${v.line} - ${v.message}`));
  process.exit(1);
}
'
SCRIPT
chmod +x tools/ast-grep/baseline-check.sh
CI Integration
yaml
# .github/workflows/ast-grep.yml
name: ast-grep
on: [push, pull_request]
jobs:
  ast-grep:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Node
        uses: actions/setup-node@v4
      - name: Install ast-grep
        run: npm install -g @ast-grep/cli
      - name: Run ast-grep scan
        run: cd rules/ast-grep && ast-grep scan
      - name: Run rule tests
        run: cd rules/ast-grep && ast-grep test
IDE Integration

VS Code: Install the "ast-grep" extension for inline highlighting.

Rule Writing Tips

  1. Start simple: Use basic patterns first, then add constraints
  2. Test edge cases: Create comprehensive rule-tests
  3. Use constraints: Filter by typeAnnotation, regex, kind
  4. Check inside/outside: Use inside, follows, precedes for context
  5. StopBy carefully: Control matching scope with stopBy: end or stopBy: neighbor
Show full SKILL.md (217 more words)Show less

Common Pattern Reference

PatternMatches
function $FUNC($$$PARAMS) { $$$BODY }Function declarations
const $VAR = $EXPRConst declarations
$EXPR.$PROPProperty access
import $$$ from "$MOD"Import statements
export $KIND $NAMEExport declarations
$FUNC($$$ARGS)Function calls
await $EXPRAwait expressions
try { $$$TRY } catch ($ERR) { $$$CATCH }Try-catch
$ARR.map($FN)Array methods

Critical: YAML Structure Rules

STOP: Read this before writing rules. These are the most common mistakes agents make.

1. constraints Goes at TOP LEVEL

WRONG - constraints inside rule:

yaml
id: bad-example
rule:
  pattern: import $NAME from $MOD
  constraints:           # ❌ WRONG: constraints inside rule
    MOD:
      regex: "fs"

RIGHT - constraints at top level:

yaml
id: good-example
rule:
  pattern: import $NAME from $MOD
constraints:             # ✓ CORRECT: constraints at root level
  MOD:
    regex: "fs"
2. No Duplicate Keys in YAML

WRONG - duplicate not: keys:

yaml
rule:
  all:
    - pattern: $FUNC($$$ARGS)
    - not:                 # ❌ First not
        inside:
          kind: await_expression
    - not:                 # ❌ DUPLICATE KEY - YAML will only keep one!
        inside:
          kind: return_statement

RIGHT - wrap in all: with separate patterns:

yaml
rule:
  all:
    - pattern: $FUNC($$$ARGS)
    - not:
        inside:
          kind: await_expression
          stopBy: end
    - not:
        inside:
          kind: return_statement
          stopBy: end

Or use any: for alternatives:

yaml
rule:
  any:
    - pattern: fetch($$$)
    - pattern: axios.$METHOD($$$)
3. Proper all: / any: Structure

Pattern: When you need multiple conditions or multiple negations, always wrap in all: or any:.

yaml
# Multiple conditions all must match
rule:
  all:
    - pattern: $FUNC($$$ARGS)
    - has:
        kind: call_expression
    - not:
        inside:
          kind: await_expression

# Any of these patterns match
rule:
  any:
    - pattern: console.log($$$)
    - pattern: console.warn($$$)
    - pattern: console.error($$$)
4. Top-Level Rule File Structure
yaml
id: rule-id                          # Required: unique identifier
language: TypeScript                  # Required: target language
severity: error                       # Required: error, warning, hint, info
message: "Error message"              # Required: user-facing message
files:                              # Optional: glob patterns
  - src/**/*.ts
ignores:                            # Optional: exclusion patterns
  - "**/*.test.ts"
rule:                               # Required: the matching rule
  pattern: ...                       # Basic pattern
  # OR
  all: []                           # Multiple conditions
  # OR
  any: []                           # Alternative patterns
constraints:                        # Optional: variable constraints (TOP LEVEL!)
  VAR_NAME:
    regex: "pattern"
utils:                              # Optional: utility patterns
  MY_UTIL:
    pattern: ...
5. Validate Before Running

Always validate your YAML structure before testing:

bash
# Check YAML is valid
python3 -c "import yaml; yaml.safe_load(open('rules/my-rule.yml'))" && echo "YAML OK"

# Check rule structure
python3 scripts/validate-rule.py rules/my-rule.yml

# Then run ast-grep
cd rules/ast-grep && ast-grep scan
6. Common Error Messages
ErrorCauseFix
missing field constraintsconstraints inside ruleMove to top level
yaml.scanner.ScannerErrorDuplicate keysUse all: wrapper
unknown variantInvalid enum valueCheck docs for valid values
did not find expected keyIndentation errorCheck YAML indentation

Rule Validation Script

Use this script to validate rule files before committing:

python
#!/usr/bin/env python3
"""Validate ast-grep rule YAML structure."""
import yaml
import sys
from pathlib import Path

def validate_rule(file_path):
    """Validate a single rule file."""
    content = Path(file_path).read_text()
    data = yaml.safe_load(content)
    errors = []

    # Check required fields
    required = ['id', 'language', 'severity', 'message', 'rule']
    for field in required:
        if field not in data:
            errors.append(f"Missing required field: {field}")

    # Check constraints at wrong level (common mistake)
    if 'rule' in data and isinstance(data['rule'], dict):
        if 'constraints' in data['rule']:
            errors.append("constraints inside rule: - must be at TOP LEVEL")
        if 'utils' in data['rule']:
            errors.append("utils inside rule: - must be at TOP LEVEL")
        if 'transform' in data['rule']:
            errors.append("transform inside rule: - must be at TOP LEVEL")

    # Check for duplicate keys by analyzing raw YAML
    lines = content.split('\n')
    for i, line in enumerate(lines, 1):
        stripped = line.lstrip()
        if stripped.startswith('- '):
            continue  # Skip list items
        if ':' in stripped:
            key = stripped.split(':')[0]
            # This is a simple check - proper parsing would be more robust

    if errors:
        print(f"❌ {file_path}")
        for err in errors:
            print(f"   - {err}")
        return False
    else:
        print(f"✓ {file_path}")
        return True

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Usage: validate-rule.py <rule-file.yml> [rule-file2.yml ...]")
        sys.exit(1)

    all_valid = True
    for path in sys.argv[1:]:
        if not validate_rule(path):
            all_valid = False

    sys.exit(0 if all_valid else 1)

Save as scripts/validate-rule.py and run:

bash
python3 scripts/validate-rule.py rules/*.yml
Pre-commit Hook

Add this to .git/hooks/pre-commit or .pre-commit-config.yaml:

bash
#!/bin/bash
# .git/hooks/pre-commit - validate ast-grep rules

RULES_DIR="rules/ast-grep/rules"
if [ -d "$RULES_DIR" ]; then
    echo "Validating ast-grep rules..."
    if ! python3 scripts/validate-rule.py "$RULES_DIR"/*.yml; then
        echo ""
        echo "❌ Rule validation failed. Fix YAML structure errors before committing."
        echo "   See skills/ast-grep-setup/SKILL.md for YAML structure rules."
        exit 1
    fi
fi
exit 0

Make it executable:

bash
chmod +x .git/hooks/pre-commit
GitHub Actions Validation

Add this job to validate rules in CI:

yaml
# .github/workflows/validate-ast-grep-rules.yml
name: Validate ast-grep Rules
on: [push, pull_request]
jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - name: Install pyyaml
        run: pip install pyyaml
      - name: Validate rule files
        run: python3 scripts/validate-rule.py rules/ast-grep/rules/*.yml

© alchemiststudiosDOTai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 12 other files (scripts) in skills/ast-grep-setup of alchemiststudiosDOTai/harness-engineering.

  • SKILL.md
  • scripts/validate-rule.py
  • templates/rule-tests/no-console-log-test.yml
  • templates/rule-tests/no-debugger-test.yml
  • templates/rule-tests/no-empty-catch-test.yml
  • templates/rule-tests/no-floating-promises-test.yml
  • templates/rule-tests/no-node-in-frontend-test.yml
  • templates/rules/no-console-log.yml
  • templates/rules/no-debugger.yml
  • templates/rules/no-empty-catch.yml
  • templates/rules/no-floating-promises.yml
  • templates/rules/no-node-in-frontend.yml
  • templates/sgconfig.yml

Open the folder on GitHubat commit 7a9fa15

Compare with similar skills

Ast Grep Setup 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.

Ast Grep Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ast Grep Setup this skillalchemiststudiosDOTai/harness-engineering105—~4.7kAutomated safety check: PassMIT
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.3k1 repos~2.2kAutomated safety check: PassMIT
Eslint Migrate Optionsbiomejs/biome26k—~1.4kAutomated safety check: PassApache-2.0
Ultraciteagustinusnathaniel/nextarter-tailwind1252 repos~1.2kAutomated safety check: PassMIT
Find Similar Functionsmillionco/react-doctor15k—~1.2kAutomated safety check: PassCustom licence
Code Qualityredis/RedisInsight8.9k—~1.2kAutomated safety check: PassCustom licence

Similar skills

  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.3k GitHub starsUsed in 1 repo~2.2k tokens
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when biome migrate eslint must preserve configurable ESLint rule options through source-option models, Biome conversions, typed rule variants, and migration fixtures.

    26k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Ultracite

    agustinusnathaniel/nextarter-tailwind

    Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects.

    125 GitHub starsUsed in 2 repos~1.2k tokens
    DevelopmentAuto-check passed
  • Find Similar Functions

    millionco/react-doctor

    Use truffler to find similar or pre-existing JavaScript/TypeScript symbols before implementing new code, especially helpers, utilities, parsers, formatters, scanners, fuzzy matchers, and other…

    15k GitHub stars~1.2k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Quality

    redis/RedisInsight

    Official

    Code-quality standards for RedisInsight: TypeScript strictness, naming conventions (camelCase, PascalCase, UPPERSNAKECASE), linting rules, no any without reason, no !important in styles, and…

    8.9k GitHub stars~1.2k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Boundaries Architect

    javierbrea/eslint-plugin-boundaries

    Act as a software architect: analyze a repository's folder structure and cross-file import dependencies, detect its architectural pattern, design element/file boundaries with the user, and configure…

    997 GitHub stars~4.2k tokensUpdated 3 days ago
    DevelopmentAuto-check passed

More from alchemiststudiosDOTai/harness-engineering

All 8 skills in this repo
  • Research Phase

    alchemiststudiosDOTai/harness-engineering

    This skill should be used when mapping or researching a codebase to understand its structure, patterns, and architecture.

    105 GitHub stars~1.4k tokensUpdated 6 mo ago
    Auto-check: notes
  • Execute Phase

    alchemiststudiosDOTai/harness-engineering

    Execute implementation plans from .artifacts/plan/. An agent skill from alchemiststudiosDOTai/harness-engineering.

    105 GitHub stars~1.8k tokensUpdated 6 mo ago
    Auto-check passed
  • Harness Map

    alchemiststudiosDOTai/harness-engineering

    Map a repository's mechanical harness layers: canonical check command, local and CI gates, architecture boundaries, structural rules, behavioral verification, docs ratchets, evidence workflows, and…

    105 GitHub stars~1.8k tokensUpdated 6 mo ago
    Auto-check passed
  • Agents Md Mapper

    alchemiststudiosDOTai/harness-engineering

    This skill should be used when creating, refreshing, or validating a repository AGENTS.md so it stays concise, current, and grounded in repository evidence.

    105 GitHub stars~1.8k tokensUpdated 6 mo ago
    Auto-check passed
  • Differential Session Runner

    alchemiststudiosDOTai/harness-engineering

    Run or continue a differential debugging session between two implementations, traces, captures, or outputs.

    105 GitHub stars~1.7k tokensUpdated 6 mo ago
    Auto-check: notes
  • Plan Phase

    alchemiststudiosDOTai/harness-engineering

    Generate execution-ready implementation plans from research docs - planning ONLY, no fixing or verifying.

    105 GitHub stars~1.8k tokensUpdated 6 mo ago
    Auto-check passed

Works with

Categories

Questions about Ast Grep Setup

What does Ast Grep Setup do?

Set up ast-grep for a codebase with common TypeScript rules for detecting anti-patterns, enforcing best practices, and preventing bugs. Ast Grep Setup is an agent skill from alchemiststudiosDOTai/harness-engineering. Set up ast-grep for a codebase with common TypeScript rules for detecting anti-patterns, enforcing best practices, and preventing bugs.

When should I use Ast Grep Setup?

Ast Grep Setup fits situations like: adding structural linting; banning legacy patterns; implementing ratchet gates.

How do I install Ast Grep Setup in Claude Code?

Run `npx skills add alchemiststudiosDOTai/harness-engineering --skill ast-grep-setup -a claude-code`. Or copy the skill folder (skills/ast-grep-setup in alchemiststudiosDOTai/harness-engineering) into .claude/skills/ast-grep-setup in your project. Claude Code loads it when a task matches its description.

How do I install Ast Grep Setup in Codex?

Run `npx skills add alchemiststudiosDOTai/harness-engineering --skill ast-grep-setup -a codex`. Or copy the skill folder (skills/ast-grep-setup in alchemiststudiosDOTai/harness-engineering) into .agents/skills/ast-grep-setup in your project. Codex loads it when a task matches its description.

Can I use Ast Grep Setup 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 alchemiststudiosDOTai/harness-engineering --skill ast-grep-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ast-grep-setup, .gemini/skills/ast-grep-setup, .github/skills/ast-grep-setup and .opencode/skills/ast-grep-setup in your project.

What does Ast Grep Setup need to run?

Going by SKILL.md and its folder, Ast Grep Setup needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and node). Our summary lists: Python 3; Node.js.

Does Ast Grep Setup 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 Ast Grep Setup 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Ast Grep Setup use?

Ast Grep Setup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ast Grep Setup use?

About 4.7k tokens (SKILL.md is roughly 19k 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 Ast Grep Setup?

Skills that share tags, products or a category with Ast Grep Setup: Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.3k stars), Eslint Migrate Options (biomejs/biome, 26k stars), Ultracite (agustinusnathaniel/nextarter-tailwind, 125 stars) and Find Similar Functions (millionco/react-doctor, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ast Grep Setup?

alchemiststudiosDOTai (a GitHub organization) maintains it in alchemiststudiosDOTai/harness-engineering, which has 105 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on March 17, 2026.

Source: alchemiststudiosDOTai/harness-engineering on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.