holded-skill
Use holdedcli to read and modify Holded data with a safe, repeatable workflow.
Operational Flow
- Confirm technical prerequisites.
- Discover available actions with
holded actions list.
- Inspect the selected action with
holded actions describe <action> --json.
- Classify the action as read or write.
- If it is a write operation, ask for explicit confirmation before execution.
- Run with
--json and summarize IDs, HTTP status, and applied changes.
Prerequisites
- Verify that the binary exists:
holded help
- Verify credentials:
holded auth status or HOLDED_API_KEY
- Prefer structured output whenever possible:
--json
Safety Rules
- Treat any
POST, PUT, PATCH, or DELETE action as write.
- Treat any
GET action (or HEAD when present) as read.
- Before any operation, always run
holded actions describe <action> --json (after holded actions list) to validate accepted parameters.
- For purchase receipts, always enforce
docType=purchase and include "isReceipt": true in the JSON body.
- Ask for explicit user confirmation every time before any write action.
- Do not execute writes on ambiguous replies (
ok, go ahead, continue) without clarification.
- Repeat the exact command before confirmation to avoid unintended changes.
- If the user does not confirm, stop and offer payload adjustments.
Mandatory Confirmation Protocol
Before any write action, show:
- Holded action (
action_id or operation_id).
- Method and endpoint.
--path, --query, and body parameters (--body or --body-file).
- The exact command to run.
Use this format:
This operation will modify data in Holded.
Action: <action_id> (<METHOD> <endpoint>)
Changes: <short summary>
Command: holded actions run ... --json
Do you confirm that I should run exactly this command? (reply with "yes" or "confirm")
Execute only after an explicit affirmative response.
Execution Pattern
Read Operations
- Locate the action with
holded actions list --json (use --filter).
- Verify accepted path/query/body parameters with
holded actions describe <action> --json.
- Run
holded actions run <action> ... --json.
- Return a clear summary and relevant IDs for follow-up steps.
Write Operations
- Locate and validate the action.
- Run
holded actions describe <action> --json to verify required/optional parameters.
- Prepare the final payload.
- If creating a purchase receipt/ticket, verify
docType=purchase and "isReceipt": true.
- Request mandatory confirmation.
- Run the command after confirmation.
- Report result (
status_code, affected ID, API response).
Base Commands
holded auth set --api-key "$HOLDED_API_KEY"
holded auth status
holded ping --json
holded actions list --json
holded actions list --filter contacts --json
holded actions describe invoice.get-contact --json
holded actions run invoice.get-contact --path contactId=<id> --json
For long payloads, prefer --body-file:
holded actions run invoice.update-contact \
--path contactId=<id> \
--body-file payload.json \
--json
Purchase receipt rule (mandatory for purchase tickets):
holded actions describe invoice.create-document --json
holded actions run invoice.create-document \
--path docType=purchase \
--body '{"isReceipt": true}' \
--json
Error Handling
- If
MISSING_API_KEY appears, configure API key through --api-key, HOLDED_API_KEY, or holded auth set.
- If
ACTION_NOT_FOUND appears, list the catalog and search with --filter.
- If
INVALID_BODY appears, validate JSON before execution.
- If
API_ERROR appears, report status_code and the API snippet.
References
- Read
{baseDir}/references/holdedcli-reference.md for quick commands and criteria.
- Use dynamic action discovery and parameter inspection via:
holded actions list --json
holded actions describe <action> --json
1---2name: holded-skill3description: Operate Holded ERP through holdedcli to read and update data safely. Use when the user asks to read, search, create, update, or delete Holded entities (contacts, invoices, products, CRM, projects, team, accounting) or run Holded API endpoints from the terminal.4---56# holded-skill78Use `holdedcli` to read and modify Holded data with a safe, repeatable workflow.910## Operational Flow11121. Confirm technical prerequisites.132. Discover available actions with `holded actions list`.143. Inspect the selected action with `holded actions describe <action> --json`.154. Classify the action as read or write.165. If it is a write operation, ask for explicit confirmation before execution.176. Run with `--json` and summarize IDs, HTTP status, and applied changes.1819## Prerequisites2021- Verify that the binary exists: `holded help`22- Verify credentials: `holded auth status` or `HOLDED_API_KEY`23- Prefer structured output whenever possible: `--json`2425## Safety Rules2627- Treat any `POST`, `PUT`, `PATCH`, or `DELETE` action as **write**.28- Treat any `GET` action (or `HEAD` when present) as **read**.29- Before any operation, always run `holded actions describe <action> --json` (after `holded actions list`) to validate accepted parameters.30- For purchase receipts, always enforce `docType=purchase` and include `"isReceipt": true` in the JSON body.31- Ask for explicit user confirmation **every time** before any write action.32- Do not execute writes on ambiguous replies (`ok`, `go ahead`, `continue`) without clarification.33- Repeat the exact command before confirmation to avoid unintended changes.34- If the user does not confirm, stop and offer payload adjustments.3536## Mandatory Confirmation Protocol3738Before any write action, show:39401. Holded action (`action_id` or `operation_id`).412. Method and endpoint.423. `--path`, `--query`, and body parameters (`--body` or `--body-file`).434. The exact command to run.4445Use this format:4647```text48This operation will modify data in Holded.49Action: <action_id> (<METHOD> <endpoint>)50Changes: <short summary>51Command: holded actions run ... --json52Do you confirm that I should run exactly this command? (reply with "yes" or "confirm")53```5455Execute only after an explicit affirmative response.5657## Execution Pattern5859### Read Operations60611. Locate the action with `holded actions list --json` (use `--filter`).622. Verify accepted path/query/body parameters with `holded actions describe <action> --json`.633. Run `holded actions run <action> ... --json`.644. Return a clear summary and relevant IDs for follow-up steps.6566### Write Operations67681. Locate and validate the action.692. Run `holded actions describe <action> --json` to verify required/optional parameters.703. Prepare the final payload.714. If creating a purchase receipt/ticket, verify `docType=purchase` and `"isReceipt": true`.725. Request mandatory confirmation.736. Run the command after confirmation.747. Report result (`status_code`, affected ID, API response).7576## Base Commands7778```bash79holded auth set --api-key "$HOLDED_API_KEY"80holded auth status81holded ping --json82holded actions list --json83holded actions list --filter contacts --json84holded actions describe invoice.get-contact --json85holded actions run invoice.get-contact --path contactId=<id> --json86```8788For long payloads, prefer `--body-file`:8990```bash91holded actions run invoice.update-contact \92 --path contactId=<id> \93 --body-file payload.json \94 --json95```9697Purchase receipt rule (mandatory for purchase tickets):9899```bash100holded actions describe invoice.create-document --json101holded actions run invoice.create-document \102 --path docType=purchase \103 --body '{"isReceipt": true}' \104 --json105```106107## Error Handling108109- If `MISSING_API_KEY` appears, configure API key through `--api-key`, `HOLDED_API_KEY`, or `holded auth set`.110- If `ACTION_NOT_FOUND` appears, list the catalog and search with `--filter`.111- If `INVALID_BODY` appears, validate JSON before execution.112- If `API_ERROR` appears, report `status_code` and the API snippet.113114## References115116- Read `{baseDir}/references/holdedcli-reference.md` for quick commands and criteria.117- Use dynamic action discovery and parameter inspection via:118 - `holded actions list --json`119 - `holded actions describe <action> --json`