> ## Documentation Index
> Fetch the complete documentation index at: https://glide-9da73dea.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a skill

> Use the spend-export example to define a skill manifest, consent copy, policy and tested entry point.

The spend-export example demonstrates a skill that converts supplied audit receipts into CSV. Its tests use a mock client. They do not prove that a hosted audit stream or install flow is connected.

## Inspect the example

In `examples/build-a-skill-spend-export`, read:

* `manifest.yml` for the skill metadata.
* `policy-template.json` for the suggested policy.
* `consent-flow.md` for the requested access.
* `src/skill.ts` for `exportLastMonthSpend`.
* `src/skill.test.ts` for the mock-client tests.

Copy the example directory to start your own skill. Update its identity, permissions, consent copy and entry point to match what your implementation does.

## Connect the data source

`exportLastMonthSpend` expects its client to return an array of events containing receipts. The MCP `audit.stream` contract returns a stream cursor instead. Implement an adapter that obtains authorized events and supplies the shape expected by the example; the example is not a direct drop-in client for that endpoint.

The function parses receipt rows with `parseSpendReceipt` and returns CSV using `exportCsv`. It skips malformed receipts. Review skipped rows before using the output for accounting.

## Run the tests

With product-repository dependencies installed, run from the repository root:

```bash theme={null}
pnpm --filter @glide-examples/build-a-skill-spend-export test
```

These tests exercise the example's manifest and CSV behavior. Validate the real data source, grant scope and consent flow separately before publishing your skill.

## Source

[Read the spend-export skill example](https://github.com/glide-co/glide-mono/tree/main/examples/build-a-skill-spend-export). Source access is required.

## Next

* [Skill authoring](https://glide-9da73dea.mintlify.site/oss/skills/authoring.md)
* [Skill manifest](https://glide-9da73dea.mintlify.site/oss/standards/skill-manifest.md)
* [Policy envelope](https://glide-9da73dea.mintlify.site/agents/policy-envelope.md)
* [audit.stream](https://glide-9da73dea.mintlify.site/agents/api/audit-stream.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.