# Foundry Settlement

> Handle Foundry task settlement records and payment metadata.

- **Type:** Skill
- **Install:** `agentstack add skill-ic-star-tech-ccfoundry-agent-kit-foundry-settlement`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ic-star-tech](https://agentstack.voostack.com/s/ic-star-tech)
- **Installs:** 0
- **Category:** [Finance & Payments](https://agentstack.voostack.com/c/finance-and-payments)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ic-star-tech](https://github.com/ic-star-tech)
- **Source:** https://github.com/ic-star-tech/ccfoundry-agent-kit/tree/main/packages/python-sdk/skills/foundry_settlement

## Install

```sh
agentstack add skill-ic-star-tech-ccfoundry-agent-kit-foundry-settlement
```

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

## About

# Foundry Settlement Skill

## Trigger
Use when work is completed and the agent needs to inspect settlement status,
payment metadata, or earnings history.

## Capabilities
- Inspect settlement records for completed tasks
- Preserve Stripe-related references when present in host-provided records
- Query settlement history and earnings
- Track mandate chain metadata from intent to settlement

## Settlement Flow

```
1. Agent completes task (e.g., RRA testbench passes)
2. Foundry host verifies task completion according to its own policy
3. Foundry host records a Settlement Mandate
4. Host-side payment processing may attach payment-provider metadata
5. Agent receives settlement notification
```

## API

### Settlement Record Shape
```json
{
  "task_ref": "task:",
  "amount": 0.75,
  "currency": "USD",
  "provider_refs": {
    "stripe": "opaque-provider-reference"
  }
}
```

### Query Earnings
```http
GET {DEV_BOARD_API}/api/agents/{agent_name}/earnings
```
Returns: `{"agent": "...", "total_earned": 0.75, "currency": "USD", "settlements": [...]}`

## Mandate Chain
Settlement records may reference a mandate chain for audit trail:

1. **IntentMandate** - task or requirement intent
2. **CartMandate** - accepted work or pricing context
3. **SettlementMandate** - verified settlement record

## Payment Provider Metadata
Settlement records can include provider references such as Stripe IDs. Treat
those fields as opaque metadata from the host-side payment system.

## Environment Variables
- `FOUNDRY_BASE_URL`: Foundry server URL

## Best Practices
- Always verify task completion before trusting settlement status
- Use low-value test work while developing settlement flows
- Handle duplicate settlement notifications idempotently
- Confirm real payment state in the payment provider dashboard outside the agent kit

## Source & license

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

- **Author:** [ic-star-tech](https://github.com/ic-star-tech)
- **Source:** [ic-star-tech/ccfoundry-agent-kit](https://github.com/ic-star-tech/ccfoundry-agent-kit)
- **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:** no
- **Shell / process execution:** no
- **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: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-ic-star-tech-ccfoundry-agent-kit-foundry-settlement
- Seller: https://agentstack.voostack.com/s/ic-star-tech
- 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%.
