agentleFS
engine9-aiengine9-ai/skills/e9-funnel/SKILL.md

e9-funnel

Skill1 starsChanged 48 days agoApache-2.0View on GitHub

Tentative skill: build a people funnel — a sequence of progressively smaller sets (segment/query → exported → batched/pushed → remote outcome) to find who should have been processed but was not. Use when diagnosing gaps in export → batch → push flows, “who is still missing a flag,” or audience drip pipelines. Not product code; operational analysis only.

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write a short table before querying:

    line 65
  2. Very specific:

    Use input.id for later files / download.

    line 81
  3. Very specific:

    Use MCP eql or sql. Prefer one query that returns distinct keys at the chosen grain.

    line 85
  4. Very specific:

    If path is unsupported or listing fails, stop for stage D and report C/E without inventing push membership.

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

People funnel (tentative)

A funnel is a named sequence of progressively smaller sets of people (or emails). Each stage is a filter on the previous stage. The goal is to locate the first stage where expected people drop out — for example who matched a query, who landed in an export dataset, who was batched for upload, and who shows the remote outcome.

This skill is tentative. It documents a working pattern, not a finished product surface.

Quick reference

Stage ideaTypical source
A — universeWarehouse EQL/SQL (segment, source code, transactions, …)
B — still needs actionA minus remote/warehouse outcome already true
C — exportedInput store *.export.csv for the flow’s remote_input_id
D — batched / pushedInput store batched/ via MCP files + path: "batched"
E — remote outcomeVendor table / custom field / CRM flag

Rule: Report each stage as a count (and grain: person_id vs email). Do not jump to the bottom stage without stating the intermediates.

Concepts

Grain

Export datasets often unique on email. Warehouse queries often unique on person_id. One person may have several emails; one export row is usually one email. Always state which grain each stage uses and whether a “missing” person still has another email that already passed.

Export → batch → push

A common drip flow:

  1. ExportWorker.export writes new unique keys into an input_type: export store (unique_fields, dedupe_against).
  2. InputWorker.batchUnprocessed reads unprocessed rows and writes a batch file under batched/ (ledger / seen_records).
  3. A vendor method (for example pushPeopleFile) uploads that batch.

Funnel stages map onto those artifacts, then onto the remote field that should change after a successful push.

MCP-only file access

Rule: For input-store files, use MCP input only. Do not use local aws s3, client AWS credentials, or shell S3 sync.

{ "command": "files", "account_id": "<account_id>", "input_id": "<uuid>" }
{ "command": "files", "account_id": "<account_id>", "input_id": "<uuid>", "path": "batched" }
{ "command": "download", "account_id": "<account_id>", "input_id": "<uuid>", "filename": "batched/foo.batch.csv" }

Rule: Listed name is relative to the input store root (batched/seen_records.txt, not bare seen_records.txt). Pass that string as filename to download / summary.

Rule: path is a directory name from a prior listing (or omit / "" for root). Response includes path + directory. Rejects .., absolute paths, and s3:// URIs.

Rule: If MCP still cannot supply a stage after using path, stop. Do not invent child paths or fall back to AWS.

Workflow

1. Name the stages

Write a short table before querying:

StageDefinitionGrainHow you will measure
A…person / emailEQL/SQL
BA minus outcome……
CIn export storeemailMCP input files + download / summary
DBatched / pushedemailMCP files with path: "batched", then download
ERemote outcome trueemailWarehouse vendor table / field

2. Resolve the export input

{ "command": "list", "account_id": "<account_id>", "input_type": "export", "q": "<remote_input_id fragment>" }

Use input.id for later files / download.

3. Measure A and B (warehouse)

Use MCP eql or sql. Prefer one query that returns distinct keys at the chosen grain. For “should have flag X but doesn’t,” compute A, then B = A anti-joined to the outcome table on the same grain (usually email).

4. Measure C (exported)

  1. input files for that input_id.
  2. For each *.export.csv (skip .metadata.json5), download or summary.
  3. Union emails (or unique keys). Compare to A/B.

Metadata sidecars often include people_searched, records, and deduplicated — useful for stage totals when you do not need the full email list.

5. Measure D (batched / pushed)

  1. Root files — note the batched directory entry.
  2. files with path: "batched".
  3. download / summary each listed store-relative name (e.g. batched/*.batch.csv, batched/seen_records.txt).
  4. Union keys for the stage count.

If path is unsupported or listing fails, stop for stage D and report C/E without inventing push membership.

6. Measure E (remote outcome)

Query the vendor/warehouse field that the push is supposed to set. Reconcile with B: people still in B after C (and D when available) are the operational gap.

7. Report the funnel

| Stage | Definition | Count | Grain |
| A | … | n | person_id |
| B | … | n | email |
| C | … | n | email |
| D | … | n or blocked | email |
| E | … | n | email |

Gap: B − E (or B − C, …) with a one-line hypothesis.

Rules

Rule: A funnel is analysis, not a new engine9 worker or schema.

Rule: Never name specific clients or accounts in this skill’s examples; use <account_id>, <remote_input_id>, <input_id>.

Rule: Stop when MCP cannot supply a stage. Partial funnels are valid.

Rule: Do not use local AWS/S3 tooling for account input stores.

Rule: Keep stages nested: each stage ⊆ previous stage at the agreed grain (after normalizing email case/trim).

Examples

Export drip vs remote custom field

  1. A — people with a transaction matching a source-code pattern.
  2. B — emails in A whose vendor person row does not have custom_… = 'y'.
  3. C — emails in the export input store for that drip (*.export.csv).
  4. D — emails in batched/ (files + path: "batched", then download).
  5. E — emails with custom_… = 'y' on the vendor person table.

Typical reading: C ≈ A (export caught up) but B still large → push or remote apply lag; compare D to B/E for upload vs vendor apply.

Troubleshooting

SymptomLikely cause
C ≪ AExport not run, bad search EQL, or dedupe path wrong
C ≈ A but B largeBatches not pushed, wrong upload column, or vendor table stale
download rejects batched/…Call files with path: "batched" first; use the listed store-relative name
Bare seen_records.txt rejectedUse batched/seen_records.txt (root-relative name)
Person counts ≠ email countsMulti-email people; state grain explicitly

Related documentation

TopicDoc
MCP input files / downloade9-mcp
Export packages and input storese9-export
Input identity and storese9-input
EQL / SQL queriese9-eql

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.