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
71 changes: 71 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "bruin-agent-resource-kit",
"owner": {
"name": "Bruin",
"url": "https://github.com/bruin-data"
},
"description": "Example agent skills for working with a startup's data through Bruin. Sample code, provided as-is; not a supported Bruin product.",
"plugins": [
{
"name": "bruin-agent",
"description": "Install the Bruin CLI, create a project, choose a template, connect a source and register the Bruin MCP server.",
"source": "./",
"strict": false,
"skills": [
"./resources/bruin-agent"
]
},
{
"name": "startup-data-kit",
"description": "Set up a Bruin template for a startup's data and answer questions from it: revenue, marketing, product, web, AI search, finance, support, AI coding spend, sheets and Notion.",
"source": "./",
"strict": false,
"skills": [
"./resources/startup-data-kit/ai-coding-spend",
"./resources/startup-data-kit/ai-search-visibility",
"./resources/startup-data-kit/finance-accounting",
"./resources/startup-data-kit/marketing-analytics",
"./resources/startup-data-kit/product-analytics",
"./resources/startup-data-kit/revenue-analytics",
"./resources/startup-data-kit/sheets-and-notion",
"./resources/startup-data-kit/support-analytics",
"./resources/startup-data-kit/web-analytics"
]
},
{
"name": "data-engineering-skills",
"description": "Keep Bruin pipelines healthy: triage failures, investigate anomalies, backfill safely, open maintenance pull requests, report what happened.",
"source": "./",
"strict": false,
"skills": [
"./resources/data-engineering-skills/anomaly-investigate",
"./resources/data-engineering-skills/bruin-builtin-skills",
"./resources/data-engineering-skills/maintenance-pr",
"./resources/data-engineering-skills/pipeline-backfill",
"./resources/data-engineering-skills/pipeline-report",
"./resources/data-engineering-skills/pipeline-triage"
]
},
{
"name": "coding-agent-workflows",
"description": "Repeatable work on a codebase: customer-facing changelogs and recorded terminal demos.",
"source": "./",
"strict": false,
"skills": [
"./resources/coding-agent-workflows/generate-changelog",
"./resources/coding-agent-workflows/record-terminal-demo"
]
},
{
"name": "tools",
"description": "Sample scripts an agent can shell out to, run with your own credentials: Attio CRM, blog cover images, LinkedIn enrichment via Apify.",
"source": "./",
"strict": false,
"skills": [
"./resources/tools/attio-cli",
"./resources/tools/blog-image-generator",
"./resources/tools/linkedin-enrichment"
]
}
]
}
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# GitHub language statistics (Linguist). This repository is a catalogue of
# Markdown skills; the Python is sample code and tooling around them.
# https://github.com/github-linguist/linguist/blob/main/docs/overrides.md

# Markdown is a prose language, which Linguist leaves out of the stats unless
# it is marked detectable.
*.md linguist-detectable

# Sample scripts and the checker: excluded from the stats.
resources/**/scripts/** linguist-vendored
*.py linguist-vendored
*.py -linguist-detectable

# Generated by sample-data/generate.py: collapsed in diffs, excluded from stats.
resources/**/sample-data/*.csv linguist-generated
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ One or two sentences.

- [ ] `name` matches the folder, `description` starts with `Use when`
- [ ] `**Status:**` and `**Risk:**` line, chosen conservatively
- [ ] Listed in the root `README.md` index
- [ ] Listed in the root `README.md` index and in `.claude-plugin/marketplace.json`
- [ ] Says what the tool cannot do, and what the user has to decide
- [ ] No credentials, customer data or production output
- [ ] Does not ask a user to paste a credential into a conversation
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ jobs:
with:
python-version: "3.12"

# Frontmatter, status labels, upstream notes and their dates, index
# completeness, local links, forbidden files. No dependencies.
# Frontmatter, status labels, upstream notes and their dates, index and
# plugin manifest completeness, local links, sample data, forbidden
# files. No dependencies.
- name: Validate catalogue
run: ./tests/check.py

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ venv/
# Local databases from trying a template.
*.db
*.db.wal
*.duckdb
*.duckdb.wal

.DS_Store
9 changes: 5 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,13 @@ confirm. Never write an unchecked claim as though you had checked it.

Add a `**Status:**` and `**Risk:**` line under the heading. Be conservative:
`experimental` unless someone other than the author has used it. Add the
resource to the index in [`README.md`](README.md); the checker fails if you do
not.
resource to the index in [`README.md`](README.md) and to its group's plugin in
[`.claude-plugin/marketplace.json`](.claude-plugin/marketplace.json); the
checker fails if you do not.

Run `./tests/check.py` before finishing. No dependencies. It verifies
frontmatter, labels, upstream notes and their dates, index completeness, local
links, and forbidden files.
frontmatter, labels, upstream notes and their dates, index and plugin manifest
completeness, local links, sample data, and forbidden files.

Never commit a credential, customer record or production output. `.bruin.yml`,
`.env` and similar are gitignored, and both the checker and gitleaks will fail
Expand Down
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ The rules the checker enforces:
carries a date. A file that drives no tool gets a one-line precedence note
instead, saying what wins where it disagrees; the checker does not enforce
that one.
- Every resource is listed in the root `README.md` index.
- Every resource is listed in the root `README.md` index, and its folder in one
plugin's `skills` list in `.claude-plugin/marketplace.json`. Both one-line
installs read that manifest, so a skill missing from it cannot be installed.
- Sample data lives in a `sample-data/` folder, is invented, and uses only
`example.com`, `example.org` or `example.net` email addresses.
- Local links resolve, and no internal identifiers (Slack channel IDs, project
ULIDs, service accounts) or forbidden files (`.bruin.yml`, `.env`) appear.
- Files shared across a group of skills stay identical. Every
Expand Down Expand Up @@ -142,7 +146,8 @@ prevent.
```

No dependencies. It checks frontmatter, status labels, upstream notes and their
dates, index completeness, local links, and forbidden files.
dates, index and plugin manifest completeness, local links, sample data, and
forbidden files.

Then say, in the pull request: what the resource does in one sentence, what you
ran to verify it, which status and risk you chose and why, and anything you
Expand Down
91 changes: 82 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# agent-resource-kit

**Give Claude Code, Cursor and Codex your startup's data.**
[`startup-data-kit`](resources/startup-data-kit/) is a set of agent skills that
set up a maintained Bruin pipeline for revenue, marketing, product, finance or
AI coding spend, then answer questions from it without the confident wrong number.

```bash
npx skills add bruin-data/agent-resource-kit
```

![The ai-coding-usage template building on fake Claude Code and Cursor data in DuckDB, then a weekly cost query](demo/ai-coding-spend.gif)

### Try it in 2 minutes

No credentials and no warehouse: the real `ai-coding-usage` template, fake
Claude Code and Cursor usage, DuckDB. Needs the
[Bruin CLI](https://getbruin.com/docs/bruin/getting-started/introduction/installation.html)
and git; run it in an empty folder outside any git repository.

```bash
# 1. Get the template and the sample data
git clone --depth 1 https://github.com/bruin-data/agent-resource-kit
bruin init ai-coding-usage ai-coding-demo

# 2. Swap the Anthropic and Cursor API assets for the fake CSVs
cp agent-resource-kit/resources/startup-data-kit/ai-coding-spend/sample-data/*.{asset.yml,csv} \
bruin/ai-coding-demo/assets/raw/

# 3. Build every table on DuckDB, then query one
cd bruin
bruin run ai-coding-demo --full-refresh --workers 1 --start-date 2026-09-14 --end-date 2026-09-27
bruin query -c duckdb-default -q "SELECT strftime(date_trunc('week', usage_date), '%Y-%m-%d') AS week, platform, CAST(SUM(total_tokens) AS BIGINT) AS tokens, ROUND(SUM(estimated_cost_usd), 2) AS est_cost_usd FROM marts.ai_coding_usage_by_user_day GROUP BY ALL ORDER BY ALL"
```

Then ask your agent, with the skill installed, why estimated Claude Code cost
rose in the second week. [`sample-data/`](resources/startup-data-kit/ai-coding-spend/sample-data/)
says what the data is and why each flag is there; `--full-refresh` is only safe
because the demo database is new.

## What is here

**Open-source skills for AI agents.** Drop a folder into your project and your
agent knows how to do the thing.

Expand All @@ -15,13 +55,6 @@ to ask questions, work through a setup with someone, and share what you have
built with these. If a skill sent your agent somewhere unhelpful, that is worth
saying there as much as in an issue.

> **Example code, provided as-is.** This repository is not part of the Bruin
> platform, not a supported Bruin product, and not covered by any support
> agreement or SLA. It is documentation and sample scripts: it stores no customer
> data, holds no credentials, and has no access to any production system. Scripts
> run on your own machine, under your own credentials, configured by you. See
> [LICENSE](LICENSE) for the warranty disclaimer.

## Resources

**Setup**
Expand Down Expand Up @@ -85,7 +118,26 @@ and do not guarantee.

## Use it

**Copy the folder.** Your agent picks it up with no further setup.
**With [skills.sh](https://skills.sh)**, for Claude Code, Cursor, Codex and
the other agents it supports. It lists every skill here and asks which to
install and for which agents.

```bash
npx skills add bruin-data/agent-resource-kit
npx skills add bruin-data/agent-resource-kit --skill ai-coding-spend # just one
npx skills add bruin-data/agent-resource-kit --list # look first
```

**As a Claude Code plugin.** Each group is a plugin: `bruin-agent`,
`startup-data-kit`, `data-engineering-skills`, `coding-agent-workflows` and
`tools`. Plugin skills are namespaced, such as `/startup-data-kit:ai-coding-spend`.

```text
/plugin marketplace add bruin-data/agent-resource-kit
/plugin install startup-data-kit@bruin-agent-resource-kit
```

**Or copy the folder.** Your agent picks it up with no further setup.

```bash
git clone https://github.com/bruin-data/agent-resource-kit
Expand All @@ -108,6 +160,17 @@ I need to work out why our MRR stopped growing last quarter.

It reads the index, then the one skill it needs.

## Tested

> **TODO:** results pending. The comparison runs separately and fills in this
> table.

| Question | Without skill | With skill |
|---|---|---|
| TODO | TODO | TODO |
| TODO | TODO | TODO |
| TODO | TODO | TODO |

## Upstream documentation is the source of truth

Every file here is a snapshot of how something worked the day it was written.
Expand Down Expand Up @@ -158,10 +221,20 @@ has the shape, the labels, and what gets rejected.
```

No dependencies. It checks frontmatter, status labels, upstream notes and their
dates, index completeness, local links, and files that must never be committed.
dates, index and plugin manifest completeness, local links, sample data that
uses only reserved example domains, and files that must never be committed.
CI runs it on every change, scans for credentials with gitleaks, and checks
external links weekly so a dead upstream link surfaces on its own.

## Provided as-is

> **Example code, provided as-is.** This repository is not part of the Bruin
> platform, not a supported Bruin product, and not covered by any support
> agreement or SLA. It is documentation and sample scripts: it stores no customer
> data, holds no credentials, and has no access to any production system. Scripts
> run on your own machine, under your own credentials, configured by you. See
> [LICENSE](LICENSE) for the warranty disclaimer.

## Licence

MIT. See [LICENSE](LICENSE).
Binary file added demo/ai-coding-spend.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions demo/ai-coding-spend.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Try ai-coding-spend in 2 minutes: the ai-coding-usage template on fake data.
#
# Recorded with Bruin CLI v0.11.767 and VHS. Re-render from this folder:
#
# python3 ../resources/coding-agent-workflows/record-terminal-demo/scripts/render_demo.py ai-coding-spend.tape
#
# Hidden setup stands in for step 1's `git clone`: it links this working tree
# into a fresh folder as agent-resource-kit, so the recording shows the sample
# data at this commit rather than whatever is on GitHub.

Output ai-coding-spend.gif

Set Shell bash
Set FontSize 18
Set Width 1280
Set Height 760
Set Margin 0
Set Padding 28
Set LineHeight 1.15
Set TypingSpeed 25ms
Set Framerate 30
Set CursorBlink false
Set Theme "GitHub Dark"

Hide
Type "export KIT=$(git rev-parse --show-toplevel)" Enter
Type "rm -rf /tmp/try-ai-coding-spend && mkdir /tmp/try-ai-coding-spend && cd /tmp/try-ai-coding-spend" Enter
Type "ln -s $KIT agent-resource-kit" Enter
Type "unset NO_COLOR && export TERM=xterm-256color CLICOLOR=1" Enter
# \[ \] mark the colour codes as zero-width, so readline wraps the long query
# line correctly.
Type `export PS1="\n\[$(tput setaf 6)\]> \[$(tput sgr0)\]"` Enter
Type "clear" Enter
Show

Type "# 1. The real ai-coding-usage template" Enter
Type "bruin init ai-coding-usage ai-coding-demo" Enter
Sleep 2s

Type "# 2. Fake Claude Code and Cursor CSVs instead of the API assets" Enter
Type "cp agent-resource-kit/resources/startup-data-kit/ai-coding-spend/sample-data/*.{asset.yml,csv} bruin/ai-coding-demo/assets/raw/" Enter
Sleep 1s
Type "clear" Enter

Type "# 3. Build every table on DuckDB, then query one" Enter
Type "cd bruin" Enter
Type "bruin run ai-coding-demo --full-refresh --workers 1 --start-date 2026-09-14 --end-date 2026-09-27" Enter
Sleep 4s
Type "clear" Enter
Type@15ms `bruin query -c duckdb-default -q "SELECT strftime(date_trunc('week', usage_date), '%Y-%m-%d') AS week, platform, CAST(SUM(total_tokens) AS BIGINT) AS tokens, ROUND(SUM(estimated_cost_usd), 2) AS est_cost_usd FROM marts.ai_coding_usage_by_user_day GROUP BY ALL ORDER BY ALL"` Enter
Sleep 6s
6 changes: 5 additions & 1 deletion resources/startup-data-kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ domain reconciling against its source before adding a second.

## How each skill works

Every folder holds exactly these three files:
Every folder holds these three files:

| File | What it is |
|---|---|
| `SKILL.md` | What is specific to the domain: which templates to consider, what usually needs the user's input, what to reconcile against |
| `workflow.md` | The shared setup process, from installing Bruin to reconciling the first run |
| `analysis.md` | How to answer questions once the pipeline exists |

`ai-coding-spend` also carries a [`sample-data/`](ai-coding-spend/sample-data/)
folder: fake Claude Code and Cursor usage that runs its template on DuckDB with
no credentials.

`workflow.md` is identical in every folder, so a skill copied alone still works.
`tests/check.py` fails if the copies drift; edit one and copy it to the rest.

Expand Down
7 changes: 6 additions & 1 deletion resources/startup-data-kit/ai-coding-spend/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: Use when a startup wants AI coding tool usage and spend set up or a
> **Upstream documentation wins.** Where this file disagrees with the [Bruin
> docs](https://getbruin.com/docs/bruin/overview.html), `bruin --help`, or
> Anthropic's or Cursor's API documentation, those are right and this file is
> stale. Written against Bruin CLI `v0.11.766`, checked 2026-10-01.
> stale. Written against Bruin CLI `v0.11.767`, checked 2026-10-02.

Sets up a Claude Code and Cursor usage pipeline and answers adoption and cost
questions from it. It exists to prevent an estimated cost being read as the
Expand All @@ -20,6 +20,10 @@ bill, and usage data being turned into a ranking of engineers.

Follow [workflow.md](workflow.md).

**No credentials yet?** [sample-data/](sample-data/README.md) runs the template
on fake usage in DuckDB. Use it to show the user what they will get; never
present its numbers as theirs.

> **Important: do not ask a fixed list of questions.** Read the template as it
> is today and work out which of its choices this user needs to confirm.
> Templates change, so the questions change with them.
Expand All @@ -33,6 +37,7 @@ theirs to build.
- Coverage is Claude Code on the first-party Anthropic API, and Cursor; Bedrock, Vertex AI, Foundry, Claude Platform on AWS, Claude Enterprise claude.ai users and every other tool are silently missing.
- Cost columns are estimates, not the bill, built differently per vendor, with no seat fees; no seat list is ingested.
- History lives only in the marts; `--full-refresh` drops it.
- A first run fails on the per-day marts until they exist; Bruin's materialization docs say to create them with `--full-refresh`, the template README does not. Ask first, and only while there is no history.

**Usually needs the user's input:**

Expand Down
Loading
Loading