agentleFS
paruffparuff/uFawkesAI/.agents/skills/lang/SKILL.md

lang

Skill2 starsChanged 2 months agoMITView on GitHub

Language-specific toolchain conventions for Python and TypeScript. Implements DORA AI Capabilities 3, 4.

  • Installs packages

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All public function signatures fully annotated

    line 86
  2. Very specific:

    Use from __future__ import annotations for forward references

    line 87
  3. Very specific:

    Prefer TypeAlias over bare assignments for complex types

    line 88
  4. Distinctive:

    All external API responses typed with Zod or explicit interface

    line 190
  5. Very specific:

    No inline type definitions in function signatures — define in src/types/index.ts

    line 191

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: lang

Load trigger: "load lang skill" > DORA: AI Capabilities 3, 4 Token cost: Low

Purpose

Language-specific toolchain conventions for Python and TypeScript. CI gate commands, file layout, interface patterns, and configuration standards. Implements DORA AI Capabilities 3, 4.

When to Use

  • Working on a Python or TypeScript/JavaScript project
  • Setting up CI gates for language-specific tooling

Sub-skills (now integrated)

PYTHON

Skill: Language — Python

Load trigger: "load lang-python skill" > Stack: Python 3.11+, ruff, mypy, pytest, pytest-cov, uv or pip Token cost: Low

Toolchain Reference

GateToolCommandConfig file
Lintruffruff check .pyproject.toml [tool.ruff]
Formatruffruff format .pyproject.toml [tool.ruff.format]
Typecheckmypymypy src/pyproject.toml [tool.mypy]
Testpytestpytestpyproject.toml [tool.pytest.ini_options]
Coveragepytest-covpytest --cov=src --cov-report=term-missing.coveragerc
Preflightshell./scripts/preflight.shscripts/preflight.sh

File Layout Convention

src/
  [package_name]/
    __init__.py
    services/           ← business logic
    utils/              ← pure functions
    models/             ← data models (Pydantic or dataclasses)
    api/                ← HTTP handlers / FastAPI routers
tests/
  test_services/        ← mirrors src/services/
  test_utils/           ← mirrors src/utils/
  conftest.py           ← shared fixtures
pyproject.toml          ← all tool config here (not setup.py)

CI Gate Commands (ci-quality.yml)

- name: Set up Python
  uses: actions/setup-python@v5
  with:
    python-version: "3.11"

- name: Install dependencies
  run: pip install -e ".[dev]"

- name: Lint
  run: ruff check .

- name: Typecheck
  run: mypy src/

- name: Test with coverage
  run: pytest --cov=src --cov-fail-under=80 --cov-report=xml

Type Standards

  • All public function signatures fully annotated
  • Use from __future__ import annotations for forward references
  • Prefer TypeAlias over bare assignments for complex types
  • Pydantic v2 for data validation at service boundaries
  • No # type: ignore without an inline comment explaining why

pyproject.toml Minimum Config

[tool.ruff]
line-length = 88
target-version = "py311"

[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]

[tool.mypy]
strict = true
python_version = "3.11"

[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--strict-markers"

[tool.coverage.run]
source = ["src"]
omit = ["tests/*"]

OTEL SDK (for obs-agent)

pip install opentelemetry-sdk opentelemetry-exporter-otlp-proto-http

Init pattern: call configure_otel() at application entry point before importing service modules. Read OTEL_SERVICE_NAME and OTEL_EXPORTER_OTLP_ENDPOINT from env.

fawkes Repo Context

paruff/fawkes uses Python extensively (43.5% of codebase). Primary patterns:

  • FastAPI for HTTP services
  • Pydantic v2 for models
  • pytest with conftest fixtures
  • .flake8 and .coveragerc exist in root (legacy — ruff supersedes flake8)

TYPESCRIPT

Skill: Language — TypeScript

Load trigger: "load lang-typescript skill" > Stack: TypeScript, Node.js, ESLint, tsc, Jest/Vitest, npm Token cost: Low

Toolchain Reference

GateToolCommandConfig file
LintESLintnpm run lint.eslintrc.js or eslint.config.js
Typechecktscnpm run typechecktsconfig.json
TestJest or Vitestnpm run testjest.config.ts or vitest.config.ts
CoverageJest --coveragenpm run test:coveragejest.config.ts
Preflightcustomnpm run preflightscripts/preflight.sh

File Layout Convention

src/
  types/index.ts        ← all shared types and interfaces
  services/             ← business logic, no UI dependencies
  utils/                ← pure functions, no side effects
  screens/ or pages/    ← UI layer only
tests/
  services/             ← mirrors src/services/
  utils/                ← mirrors src/utils/

CI Gate Commands (ci-quality.yml)

- name: Lint
  run: npm ci && npm run lint

- name: Typecheck
  run: npm run typecheck

- name: Test with coverage
  run: npm run test:coverage
  env:
    CI: true

- name: Coverage threshold
  run: |
    COVERAGE=$(cat coverage/coverage-summary.json | jq '.total.lines.pct')
    if (( $(echo "$COVERAGE < 80" | bc -l) )); then
      echo "Coverage $COVERAGE% is below 80% threshold"
      exit 1
    fi

Type Standards

  • No any in service or utility functions
  • Catch blocks: catch (error: unknown) — narrow before use
  • All external API responses typed with Zod or explicit interface
  • No inline type definitions in function signatures — define in src/types/index.ts

OTEL SDK (for obs-agent)

npm install @opentelemetry/sdk-node @opentelemetry/exporter-trace-otlp-http

Init pattern: src/instrumentation.ts — imported before all other imports in entry point.

Node Version

Node 22 LTS. Pin in .nvmrc and engines field in package.json. GitHub Actions: uses: actions/setup-node@v4 with node-version: '22'.

Usage

# Python toolchain
load lang/python skill

# TypeScript toolchain
load lang/typescript skill

Enforcement

  • DORA vocabulary validates AI Capabilities 3, 4 references
  • AI stance audit validates relevant clarity dimensions

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.