Agent skill
clifood-api
API-first iFood automation for the clifood project. Use when an AI agent needs to find restaurants/items, build carts, prep orders, or extend iFood API integrations in this repo.
Install this agent skill to your Project
npx add-skill https://github.com/danizord/clifood/tree/main/skills/clifood-api
SKILL.md
Clifood Agent Skill
Purpose
This skill is for AI agents that want to order food on iFood via the CLI: search restaurants, search items, build carts, and prepare checkout. It uses the authenticated browser session to call iFood APIs directly (no UI scraping).
Quick start (agent usage)
- Ensure a logged-in browser session with a delivery address.
- Run CLI commands from repo root.
Examples:
bun src/cli.ts restaurants --top --exclude-defaults --limit 10
bun src/cli.ts items --restaurant "Restaurante X" --query "temaki"
bun src/cli.ts order --restaurant "Restaurante X" --item "Temaki de salmão:2"
Core workflow (agent-friendly)
-
Open session + auth
- The CLI opens a Playwright browser context and reads Redux state (account + address).
getApiContext(page)captures required headers from live API calls.
-
Find restaurants / items
- Restaurants:
restaurantscommand (search or--topdiscovery feed). - Items:
itemscommand (reads merchant catalog).
- Restaurants:
-
Build cart + prep order
ordercommand resolves items withbuildCartItemsand creates a cart via API.- It opens cart + checkout for review.
-
Checkout safety
- The CLI does not submit orders unless
--confirmis provided. - Agents should stop at checkout unless explicitly asked to place the order.
- The CLI does not submit orders unless
Tracking orders
Order tracking is not implemented yet. If you need it:
- Add an API call in
src/ifood/api.ts. - Update the CLI with a
trackcommand. - Document the endpoint in
references/api.md.
Implementation notes (when extending)
- Discovery and category APIs require a POST body (see
references/api.md). - Catalog API requires
access_key/secret_keycaptured from a merchant page. - Use parser helpers in
src/ifood/parsers.tsandnormalizeTextfor filtering.
References
docs/architecture.mdfor the full API flow.docs/troubleshooting.mdfor auth/anti-bot issues.references/api.mdfor endpoint summary.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
migrate-to-shoehorn
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Didn't find tool you were looking for?