# Python Lint Format

> Lint and format a Python project with the prek hook runner. Use when checking or cleaning the working tree, resolving lint/format/type/complexity/spelling failures, or understanding what each linter config enforces.

- **Type:** Skill
- **Install:** `agentstack add skill-owenlamont-agent-skills-python-lint-format`
- **Verified:** Pending review
- **Seller:** [owenlamont](https://agentstack.voostack.com/s/owenlamont)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [owenlamont](https://github.com/owenlamont)
- **Source:** https://github.com/owenlamont/agent_skills/tree/main/skills/python-lint-format

## Install

```sh
agentstack add skill-owenlamont-agent-skills-python-lint-format
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Python Lint & Format (prek)

This project runs its linters and formatters through
[prek](https://github.com/j178/prek), a pre-commit-compatible hook runner. The hooks
cover Python style/typing as well as Markdown, YAML, and spelling.

## Installing the git hooks

A clone does not install prek's hooks — each developer installs them, and forgetting on
a fresh clone silently skips the checks:

```bash
prek install --install-hooks --overwrite
```

This is idempotent: re-run it if commits complete without the checks running. It needs a
`prek.toml` or `.pre-commit-config.yaml` present (the `--install-hooks` step also prepares
each hook's environment).

To verify the hooks are installed — cross-platform, via uv/Python rather than
shell-specific `grep`/`Select-String` (the shim's header reads `# File generated by
prek`):

```bash
uv run python -c "import pathlib, subprocess; p = pathlib.Path(subprocess.run(['git', 'rev-parse', '--git-path', 'hooks'], capture_output=True, text=True).stdout.strip(), 'pre-commit'); print('installed' if p.is_file() and 'generated by prek' in p.read_text() else 'not installed')"
```

## Running prek

```bash
prek run --all-files
```

- It auto-fixes many issues; if a run reports changed files, run it again (some first-run
  failures are already fixed).
- Fix issues by hand only when a run reports no file changes but still fails.
- It only scans git-tracked files — `git add` new files first.

## What the toolchain enforces

Each hook is driven by a config file at the repo root:

| Config file        | Tool       | Enforces                |
| ------------------ | ---------- | ----------------------- |
| `ruff.toml`        | Ruff       | Code style and linting  |
| `mypy.ini`         | mypy       | Static type checking    |
| `.complexipy.toml` | complexipy | Code complexity limits  |
| `.rumdl.toml`      | rumdl      | Markdown linting        |
| `.ryl.toml`        | ryl        | YAML linting            |
| `typos.toml`       | typos      | Spelling                |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [owenlamont](https://github.com/owenlamont)
- **Source:** [owenlamont/agent_skills](https://github.com/owenlamont/agent_skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** yes
- **Shell / process execution:** yes
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-owenlamont-agent-skills-python-lint-format
- Seller: https://agentstack.voostack.com/s/owenlamont
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
