fetching-data-via-pieces
Use when you need records from an external system the organization has a connection for — pulling past examples for an eval set, checking what a connection…
Skill by Katch-AI
Chalk Labs
Need help deploying fetching-data-via-pieces?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/katch-ai-fetching-data-via-pieces
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data, marketing, sales
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/fetching-data-via-pieces
What's inside
- Skill name
fetching-data-via-pieces- Description
- Use when you need records from an external system the organization has a connection for — pulling past examples for an eval set, checking what a connection returns, any ad-hoc read through a piece action (Salesforce, Gmail, JIRA, HubSpot…).
- License
- MIT
- Instructions
- 29 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- example-ingestions.md · references/
- pagination-patterns.md · references/
SKILL.md (first lines)
# Fetching data via pieces
Read records by running one piece action on the agent's scratch flow. Every call takes `agent_id`; the calls below omit it. Step JSON and run shapes: the `activepieces` skill.
## The loop
1. `get_agent` → `scratchActivepiecesFlowId`, the `flow_id` below. `get_activepieces_flow(flow_id)` → `versionId`, the draft you sample.
2. Build the step: `list_activepieces_connections(piece_name)` → the connection's `externalId`; `get_activepieces_piece(piece_name, action: "<action>")` → `version` and `actions[<action>].props` (never guess prop names); `get_activepieces_piece_options(…)` for a dropdown's values.
3. `apply_activepieces_flow_operation(flow_id, "ADD_ACTION", request)`: one `PIECE` step named `inv_<uuid>` with `parentStep: "trigger"`, the action's props in `settings.input` plus `auth: "{{connections['<externalId>']}}"`, and one `{"type": "MANUAL"}` `propertySettings` entry per input key. An unknown `parentStep` still answers 200; check the step is in the returned tree.
4. `sample_activepieces_step(flow_version_id, step_name)` → a run id. Poll `get_activepieces_flow_run(flow_run_id)` until `SUCCEEDED`, `FAILED`, `TIMEOUT` or `STOPPED`, then read `steps.inv_<uuid>.output` (`.errorMessage` on failure). An output over 512KB comes back as `{fileId, size, url}`: fetch the `url` directly.
5. `apply_activepieces_flow_operation(flow_id, "DELETE_ACTION", {"names": ["inv_<uuid>"]})`, also after a failure, and re-fetch the flow to confirm it is gone.
Side effects fire: sample read actions only (list, search, query, get). The scratch flow is one draft, so sample one step at a time, never from parallel subagents. Sampling runs are `TESTING` and never appear in `list_activepieces_flow_runs`.
Make the first sample a handful of rows: it confirms the connection, the account and the field names before you commit to a dataset shape. On a runtime 401 the user reauthorizes the connection in the dashboard.
## Pagination
One sample per page: `UPDATE_ACTION` the same step with its full action body (the call replaces the whole action) and the next offset, cursor or row window in `input`, sample, read, repeat. Stop on an empty page or once you have the count the eval set needs. Per-piece props and ceilings (Salesforce's 2 000-row `OFFSET`; Airtable and HubSpot return one page only): `references/pagination-patterns.md`. A labeled pull with an 80/20 split, a two-source join, and a connection check: `references/example-ingestions.md`.
## Keep the rows out of your context
Run the loop in a subagent if your harness has one: it writes each page's output to a local file and returns a summary (row count, fields, two or three examples). Otherwise keep each step's `input` tight (page size, field list) and write every output to a file as you go.
## Limits
Only pieces with a list, search, query or get action work. Labeling and joining happen in your own code over the saved files. If no piece action can read what you need, or the source has no labels and no join can derive them, tell the user.From Katch-AI/hegl-plugin, MIT.
More from Katch-AI/hegl-plugin
- 0.570score
platform-api
Katch-AI
Use when deciding which Hegl tool performs an operation (agent documents, decision boxes, flows, trigger flows, connections and config, piece installs…
SkillAFreshness: AClaude Code +9 - 0.570score
implementing-decision-boxes
Katch-AI
Use when the candidate flow is scaffolded and smoke-tested, to turn stub decision boxes into real implementations and improve them.
SkillAFreshness: AClaude Code +9 - 0.570score
asciidoc
Katch-AI
Use when writing an artifact body (the AsciiDoc documents recorded with the Hegl piece's `record_artifact` action and validated with `validate_artifact`), or…
SkillAFreshness: AClaude Code +9 - 0.570score
activepieces
Katch-AI
Use when building or editing any Activepieces flow — trigger flows, the candidate flow, piece steps, CODE steps, sandbox steps, routers, loops — when…
SkillAFreshness: AClaude Code +9 - 0.565score
rendering-templates
Katch-AI
Use when a flow must compose human-readable text from data — an email body, a Slack message, a Markdown summary, a plain-text notice.
SkillAFreshness: AClaude Code +9 - 0.565score
linking-to-the-dashboard
Katch-AI
Use when you mention anything the user can look at in the Hegl dashboard (an agent, a run, a version, a decision box, an experiment, a form, a connection…
SkillAFreshness: AClaude Code +9 - 0.565score
building-the-automation
Katch-AI
Use when asked to build the user's automation and no candidate flow exists yet.
SkillAFreshness: AClaude Code +9 - 0.565score
composing-email-html
Katch-AI
Use when authoring the htmlBody of any send_email step — during Execute when building flow steps that send email, and during Plan when sketching email content.
SkillAFreshness: AClaude Code +9 - 0.565score
mermaid
Katch-AI
Use when writing or editing any Mermaid diagram the user will see — the flow diagram in plan.md, anything pushed to flowDescription, a diagram in a spec.
SkillAFreshness: AClaude Code +9 - 0.565score
hegl
Katch-AI
Use when starting any work on a Hegl agent (building an automation, improving a decision box, inspecting runs or feedback) and whenever unsure which Hegl…
SkillAFreshness: AClaude Code +9 - 0.560score
calling-custom-apis
Katch-AI
Use when the customer's agent must call an HTTP API that has no dedicated Activepieces piece — internal services, undocumented vendor APIs, anything reachable…
SkillAFreshness: AClaude Code +9 - 0.558score
fix-errors
Katch-AI
Use when the user runs `/hegl:fix-errors` or asks why an agent's runs are failing, or about an incident.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 3, 2026 (27 days ago)
- Last release
- Oct 23, 2026 (7 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Katch-AI/hegl-plugin
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Katch-AI
- 0.570score
activepieces
Katch-AI
Use when building or editing any Activepieces flow — trigger flows, the candidate flow, piece steps, CODE steps, sandbox steps, routers, loops — when…
SkillAFreshness: AClaude Code +9 - 0.570score
platform-api
Katch-AI
Use when deciding which Hegl tool performs an operation (agent documents, decision boxes, flows, trigger flows, connections and config, piece installs…
SkillAFreshness: AClaude Code +9 - 0.570score
implementing-decision-boxes
Katch-AI
Use when the candidate flow is scaffolded and smoke-tested, to turn stub decision boxes into real implementations and improve them.
SkillAFreshness: AClaude Code +9 - 0.570score
asciidoc
Katch-AI
Use when writing an artifact body (the AsciiDoc documents recorded with the Hegl piece's `record_artifact` action and validated with `validate_artifact`), or…
SkillAFreshness: AClaude Code +9 - 0.565score
composing-email-html
Katch-AI
Use when authoring the htmlBody of any send_email step — during Execute when building flow steps that send email, and during Plan when sketching email content.
SkillAFreshness: AClaude Code +9 - 0.565score
mermaid
Katch-AI
Use when writing or editing any Mermaid diagram the user will see — the flow diagram in plan.md, anything pushed to flowDescription, a diagram in a spec.
SkillAFreshness: AClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get fetching-data-via-pieces running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
fetching-data-via-pieces skill. Agent Mart. https://agentmart.dev/skills/katch-ai-fetching-data-via-pieces (last updated 2026-10-24)