Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ plugins/
db-editor/
.claude-plugin/plugin.json # Claude Code plugin manifest
.codex-plugin/plugin.json # Codex plugin manifest (adds `interface` block)
.mcp.json # MCP servers bundled with the plugin (pcm-mcp)
.mcp.json # MCP servers bundled with the plugin (@pcmstack/mcp)
assets/ # logo.svg + app-icon.png, referenced by the Codex manifest
skills/
pcm-database/ # kebab-case
Expand Down Expand Up @@ -185,10 +185,11 @@ Consequences worth remembering:
- Skills operate on files that may be irreplaceable (a career save can be hundreds of hours).
The invariant every skill and script must preserve: **treat the original `.cdb` as
read-only** — back it up, write edits to a new file, never overwrite in place.
- No secrets or credentials belong in this repository. The bundled MCP server (`pcm-mcp`, run
via `npx -y pcm-mcp@0.4.0`) runs locally on the user's machine and needs none. The version is
pinned in [.mcp.json](plugins/db-editor/.mcp.json) so every user gets the same server —
bumping it is a deliberate change, not something `npx` should decide.
- No secrets or credentials belong in this repository. The bundled MCP server (`@pcmstack/mcp`,
run via `npx -y @pcmstack/mcp@<pin>`) runs locally on the user's machine and needs none. It is
pinned to an exact version in [.mcp.json](plugins/db-editor/.mcp.json) — read that file for
the current one, and never quote a version number here — so every user gets the same server;
bumping the pin is a deliberate change, not something `npx` should decide.
- `.claude/settings.local.json` is local, machine-specific permission state — don't extend it
as a way to encode project conventions, and don't rely on paths inside it.

Expand All @@ -198,4 +199,4 @@ Consequences worth remembering:
- `README.md` still lists "Coming soon" under Available Skills; it lags the actual contents.
- Related projects, useful when a skill's behaviour depends on them:
[cdb-converter](https://github.com/PCMStack/converter) (lossless `.cdb` ⇄ SQLite) and
[pcm-mcp](https://github.com/PCMStack/mcp) (MCP server for querying/editing PCM databases).
[@pcmstack/mcp](https://github.com/PCMStack/mcp) (MCP server for querying/editing PCM databases).
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Node and `sqlite3` are only needed at runtime, when a skill actually opens a dat

Open, explore and edit a PCM database. The skill picks between two routes on its own:

- **pcm-mcp** — the bundled [MCP server](https://github.com/PCMStack/mcp) discovers your saves
- **@pcmstack/mcp** — the bundled [MCP server](https://github.com/PCMStack/mcp) discovers your saves
on disk and exposes targeted tools (search a cyclist, read a roster, update ratings). Best
for lookups and one-off edits.
- **SQLite** — a lossless `.cdb → sqlite` conversion via
Expand All @@ -93,7 +93,7 @@ delegates serialization to `pcm_generate_startlist_xml` so the file is always we
```
your request ──▶ agent ──▶ SKILL.md
├─▶ pcm-mcp (MCP) ──▶ saves on disk, targeted reads/writes
├─▶ @pcmstack/mcp (MCP) ──▶ saves on disk, targeted reads/writes
└─▶ cdb-converter ──▶ database.sqlite ──▶ SQL ──▶ database_edited.cdb
```

Expand Down Expand Up @@ -138,5 +138,5 @@ npx prettier --check "**/*.{md,json}" # formatting
## Related projects

- [cdb-converter](https://github.com/PCMStack/converter) — lossless `.cdb` ⇄ SQLite conversion
- [pcm-mcp](https://github.com/PCMStack/mcp) — MCP server for querying and editing PCM databases
- [@pcmstack/mcp](https://github.com/PCMStack/mcp) — MCP server for querying and editing PCM databases
- [Agent Skills](https://agentskills.io/) — the portable skill format used here
2 changes: 1 addition & 1 deletion plugins/db-editor/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"interface": {
"displayName": "DB Editor",
"shortDescription": "Edit Pro Cycling Manager databases and build race startlists",
"longDescription": "Community tooling for Pro Cycling Manager. Open and edit the game database (.cdb) — rider ratings, team rosters, contracts, races — via the pcm-mcp MCP server or a lossless CDB to SQLite conversion, and compose race startlists exported as the .xml file the game imports. Unofficial project, not affiliated with or endorsed by Cyanide Studio or Nacon.",
"longDescription": "Community tooling for Pro Cycling Manager. Open and edit the game database (.cdb) — rider ratings, team rosters, contracts, races — via the @pcmstack/mcp MCP server or a lossless CDB to SQLite conversion, and compose race startlists exported as the .xml file the game imports. Unofficial project, not affiliated with or endorsed by Cyanide Studio or Nacon.",
"developerName": "PCMStack",
"category": "Developer Tools",
"capabilities": ["Interactive", "Read", "Write"],
Expand Down
4 changes: 2 additions & 2 deletions plugins/db-editor/.mcp.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"mcpServers": {
"pcm-mcp": {
"pcmstack": {
"command": "npx",
"args": ["-y", "pcm-mcp@0.4.1"]
"args": ["-y", "@pcmstack/mcp@0.5.0"]
}
}
}
6 changes: 3 additions & 3 deletions plugins/db-editor/skills/pcm-database/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: pcm-database
description: Open, explore and edit Pro Cycling Manager databases (.cdb) — rider ratings, team rosters, contracts, races. Routes between the pcm-mcp MCP server and a cdb → SQLite conversion via the cdb-converter CLI. Use this skill whenever a .cdb file is mentioned, or whenever someone talks about a PCM / Pro Cycling Manager save, career, database, roster, cyclist stats, or wants to "edit my game" — even if they never say the words "cdb" or "database", and even if they only want to read something rather than change it.
description: Open, explore and edit Pro Cycling Manager databases (.cdb) — rider ratings, team rosters, contracts, races. Routes between the MCP server and a cdb → SQLite conversion via the cdb-converter CLI. Use this skill whenever a .cdb file is mentioned, or whenever someone talks about a PCM / Pro Cycling Manager save, career, database, roster, cyclist stats, or wants to "edit my game" — even if they never say the words "cdb" or "database", and even if they only want to read something rather than change it.
---

# Pro Cycling Manager database editing
Expand Down Expand Up @@ -29,7 +29,7 @@ tool list?** Look; don't assume.
- **Present** → Route A for lookups and one-off edits, falling back to Route B as soon as the
question outgrows the tools.

The tools decide it because of what each route can physically reach. pcm-mcp runs on the
The tools decide it because of what each route can physically reach. The MCP server runs on the
user's machine, so it can find the game's own save directories, discover careers, and write a
new `.cdb` there — but it cannot see a file that exists only in your sandbox. Route B works
anywhere you can read the file and run the converter, and gives you unrestricted SQL:
Expand Down Expand Up @@ -61,7 +61,7 @@ as read-only, always:
Before writing anything — either route — read `references/database-constraints.md`. It's the running
list of what the game and the write tools actually accept.

## Route A — pcm-mcp
## Route A — MCP server

Every `pcm_*` tool is stateless: it takes an absolute `databasePath`, re-reads the `.cdb`
into a fresh in-memory database, and answers. There's no implicitly current file, so carry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ non-zero, since a never-played official release stores `0` there.

## Columns whose names are not what the tools call them

The pcm-mcp rating parameters are **camelCase API names, not database columns**. Grepping the
The `pcm_*` rating parameters are **camelCase API names, not database columns**. Grepping the
schema for the API name finds nothing and makes a column that exists look absent:

| pcm-mcp parameter | Actual `DYN_cyclist` column |
| Tool parameter | Actual `DYN_cyclist` column |
| ------------------ | -------------------------------------------------------- |
| `mediumMountain` | `charac_i_medium_mountain` (+ `limit_i_medium_mountain`) |
| `currentAbility` | `value_f_current_ability` |
Expand Down
Loading