create-spend-request17.2 KB
View saved version →
---
name: create-spend-request
description: Creates, submits, and checks approval status for a simple Custodia spend permission through the authenticated Custodia MCP. Use when a user asks for spending authority for themselves or asks whether a request from this conversation was approved.
metadata:
product: Custodia
operation: create-spend-request
---
# Create or Check a Custodia Spend Request
Create a standard one-time activity backed by Custodia's `Other` model for the authenticated user. Select the best-fitting enabled `Other/<type>` variant from the user's live options instead of defaulting every request to generic `Other`. A successful submission creates an Allocatable draft and a workflow Request. It becomes an Allocation (spend permission) only after approval.
## Requirements
Creating a request requires an authenticated Custodia MCP connection exposing `spend_request_prepare`, `spend_request_check_duplicates`, `spend_permission_request`, and `spend_request_get_status`. A status-only follow-up requires `spend_request_get_status`. If the tools required for the requested path are unavailable, stop before collecting confirmation or attempting a write and use the bundled `reconnect-custodia` workflow. A local plugin selector such as `custodia-chatgpt-plugin@local-repo` is not a registered app ID; never pass it to `plugin_management.get_app_permissions` or claim that its response proves the local plugin is not installed.
Read [references/reference.md](references/reference.md) before calling tools. Use [references/examples.md](references/examples.md) for confirmation and result wording.
## Scope
Use this workflow only when all of the following are true:
- The authenticated user is requesting a spend permission for themselves, or checking the approval status of their own request.
- The request fits a standard, one-time `Other` or `Other/<type>` activity returned by Custodia.
- The request needs only amount, currency, dates, purpose, category, and an eligible cost center.
Do not use this skill for:
- Creating for another employee or company.
- Merchant restrictions, card binding, purchase orders, keywords, transaction limits, ATM controls, or other advanced options.
- Trips, client meetings, reimbursements, emergency budgets, mileage, bulk, recurring, split, merge, or changes to existing permissions.
- Approving or rejecting a pending request.
If the user asks for unsupported options, explain that this simple assistant flow cannot enforce them. Offer the Custodia UI or a dedicated skill. Never silently drop a requested restriction and submit a broader permission.
## Non-negotiable rules
1. Use only authenticated Custodia MCP tools. Never call Custodia HTTP endpoints directly or request credentials in chat.
2. Use the exact self-service tool sequence described below. Do not substitute generic CRUD or network tools.
3. Never pass `ownerId` or `companyId`; the MCP binds both to the authenticated session.
4. Never invent category codes, currencies, dates, defaults, cost centers, or policy values.
5. Pass `amount` as a positive JSON number and `currency` as a three-letter ISO code.
6. Select the most specific, uniquely matching code from `activityTypes` using the user's stated purpose and wording. Never default to generic `Other` merely because it is first.
7. Apply the iOS-aligned defaults below whenever the user did not provide a value. Do not ask the user to choose a value that Custodia can default.
8. Show one concrete final summary and obtain an affirmative answer before calling `spend_permission_request`.
9. Generate `clientRequestId` only after confirmation and keep it private. Preserve it in the submitted payload, but do not automatically retry a write-capable submission.
10. Pass `forceMultiple: true` only when duplicate detection returned both `duplicate: true` and `forceMultipleOnConfirmedSubmit: true`, and the user explicitly confirmed continuing.
11. Treat `spend_permission_request` as one terminal compo
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 3 — file references are metadata, not package contents.
reconnect-custodia2.95 KB
View saved version →
---
name: reconnect-custodia
description: Reconnects or reauthenticates the Custodia connection in ChatGPT or Codex when tools are unavailable, authentication expired, or the user asks to reconnect.
metadata:
product: Custodia
operation: reconnect
---
# Reconnect Custodia
Restore access through the connection flow for the user's installation. Missing
tools can mean an unavailable connection or a conversation that has not loaded
the integration; they do not alone prove that credentials expired.
## ChatGPT or a registered plugin
1. Direct the user to Custodia's connection controls in the host application's
plugin or app settings. Use a supported connection-management tool only if
it is available and accepts the actual registered identity.
2. Ask the user to connect or reauthenticate Custodia in the provider's browser
flow. Do not request passwords, MFA codes, tokens, or authorization codes in chat.
3. After the connection succeeds, check whether the required Custodia tools
are available. If not, have the user open a new conversation with Custodia
enabled and retry there. Do not promise a running conversation can refresh
its tool catalogue.
4. If no connection controls are available, direct the user to the host's plugin
management UI or Custodia support. Do not replace missing domain tools with
direct HTTP calls or generic CRUD tools.
For a local selector such as `custodia-chatgpt-plugin@local-repo`, do not call
registered-app permission APIs with that selector. Never guess a registered
app or connector ID, or infer that the plugin is uninstalled from that API's
rejection of a local selector.
## Local Codex installation
Use this path only when the user is running a local installation and the host
provides a supported Codex CLI. Check the installed CLI's help before using
version-specific plugin or MCP commands. Never run local shell commands in a
ChatGPT-only environment.
1. Confirm that the Custodia plugin is installed and enabled and that its
`custodia` MCP server is configured for HTTP with OAuth. If the server is
absent, enable or reinstall the plugin before attempting login.
2. If authentication has expired, start the CLI's supported MCP login flow for
`custodia`, requesting `mcp:execute` when scope selection is supported.
3. Clear stale credentials using the supported logout command only when the
existing login is known to be stale and reauthentication is needed.
4. Keep any callback listener running while the user completes browser login.
Let the CLI handle credentials; never inspect or echo them.
5. Wait for authentication success, then check tool availability. If the current
conversation still lacks tools, ask the user to start a new conversation
with Custodia enabled.
Reinstalling package files does not itself renew OAuth credentials. If browser
login selects the wrong account, stop and let the user switch to the intended
Custodia account before retrying. Never submit a spend request as a connection
test.
Referenced files: 1 — file references are metadata, not package contents.