# endpoint-resource-action-pp-authorization-table

Skill that maps a Flask or GraphQL service's endpoints to PP `resource_type` / `resource_schema` / `action` / `pp_authorization_method`, in preparation for adding Permissions Platform authorization checks.

The skill itself is defined in [SKILL.md](SKILL.md). This README covers prerequisites and the optional Notion-publishing flow. The setup steps below assume the skill is invoked via Claude Code's MCP integration; other runners (GitHub Copilot, etc.) can use the same `SKILL.md` content but would need their own Notion connector.

## Example prompt

```
Please use the ~/work/pp-pilot/.github/skills/endpoint-resource-action-pp-authorization-table skill to generate a PP auth table for this service.

Then add the table to <notion-page-url>
```

Replace `<notion-page-url>` with the SPIKE / planning page that owns the rollout. Drop the second sentence if you only want the CSV.

## Output

- **Primary:** a CSV at `<service>_endpoint_resource_action_table.csv` in the repo root, one row per endpoint.
- **Optional:** the same table published to a Notion page as an inline database under a Toggle Heading 2, plus rollout-review notes.

## Optional: publishing to Notion

To let the skill write directly to a Notion SPIKE/planning page, install the official Notion MCP server in Claude Code at **user scope** (so it's available across all projects, not just one):

```bash
claude mcp add --transport http --scope user notion https://mcp.notion.com/mcp
```

Then run `/mcp` inside Claude Code to complete the OAuth flow with your Notion workspace. Once authenticated, the `mcp__Notion__*` tools (`notion-fetch`, `notion-create-database`, `notion-create-pages`, `notion-update-page`) become available and the skill uses them to:

1. Create a database under the target page with one `SELECT` property per non-title column.
2. Populate it with one page per endpoint (sent in a single batched call).
3. Move the database inline under a `## <service>` Toggle Heading 2 and append review notes.

The Notion page must be shared with the integration — open the page in Notion, click **···** → **Connections** → add the Notion MCP integration. Without that, `notion-fetch` will return a permission error.

If the Notion MCP isn't installed, the skill stops at the CSV step and prints a paste-ready table.

### Confirming what's installed

```bash
claude mcp list
```

If `notion` is listed under user scope, you're set. If it's only project-scoped, re-run the install command above with `--scope user`.
