agentleFS
lilly-buildslilly-builds/ads-cooking/skills/connect/SKILL.md

connect

Skill0 starsChanged 2 months agoMITView on GitHub

Connect a Meta ad account so the other commands can run, ending in a working token and a config folder. Checks Python, creates the config folder, proves the secrets file is hidden from git, and hands over Meta's setup steps as prefilled links once it knows the Business Portfolio id. Use when the user says "/ads-cooking:connect", "connect my Meta account", "set up Meta ads", "I need a Meta token", or when another command reports that nothing is configured.

  • Reads credentials

64 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use connect-apps, skill-share and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ArogyaReddySkill

    connect-apps

    Connect Claude to external apps like Gmail, Slack, GitHub. Use this skill when the user wants to send emails, create issues, post messages, or take actions in external services.

    Also in 19 projects that use this

  • ArogyaReddySkill

    skill-share

    A skill that creates new Claude skills and automatically shares them on Slack using Rube for seamless team collaboration and skill discovery.

    Also in 17 projects that use this

  • ComposioHQSkill

    agent-deep-links

    Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

    Also in 3 projects that use this

  • ComposioHQSkill

    helium-mcp

    Search real-time news with bias scoring, get live stock/ETF/crypto data with AI analysis, ML options pricing, balanced news synthesis, and meme search via the Helium MCP server.

    Also in 3 projects that use this

  • trendinuxSkill

    twitter-algorithm-optimizer

    Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.

    Also in 12 projects that use this

  • LangChainSkill

    langsmith-fetch

    Fetches LangSmith traces for debugging agent behavior. Use when troubleshooting agent issues, reviewing conversation history, or investigating tool calls.

    Also in 18 projects that use this

  • +1 more from ComposioHQ
  • +5 more from ArogyaReddy

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 56 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Accepting the non-discrimination advertising policy: when creating the system user.

    line 57
  2. Distinctive:

    Typing their password: when creating the app.

    line 58
  3. Distinctive:

    Never: Do not drive the token screen, do not click Generate token, do not click any Accept or Save on a terms or consent page, do not touch …

    line 87
  4. Distinctive:

    If the browser gets stuck, or a page needs a login, stop and hand it back rather than retrying.

    line 93
  5. Distinctive:

    Do not stop until it is clean.

    line 101
  6. Very specific:

    Do not ask them to paste the token into chat, and do not read .env back to them.

    line 109
  7. Very specific:

    Do not create the config folder by hand.

    line 110
  8. Distinctive:

    Do not carry on if the git check says STOP.

    line 112

“Common” is measured: kept by at least 6 in 10 of the 56 edited versions of this file we could read. “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

Connect a Meta ad account

One-time setup. Most of it is a person clicking through Meta. The command does the parts that have to be identical every time, and tells them what is theirs.

Run this first

PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m adscooking connect

It touches nothing on Meta. It checks the Python version, creates the config folder, locks the secrets file to the user only, proves git cannot commit it, and prints the nine Meta steps in order. Exit 3 means values are still blank, which on a first run is the expected answer.

With no flag it writes ~/.ads-cooking/. To keep the settings inside a project instead, name the folder. The flag goes before the subcommand:

PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m adscooking --config-dir ads-cooking connect

Either way, read the path it printed back to the user and tell them to fill the values in at that path. Never name a .env from memory: if they hand-make one somewhere else, a project-local folder takes precedence over the home one the moment it exists, and the hand-made file skips every check this command does.

Then get the Business Portfolio id, and re-run

Step 1 of the printed list is the Business Portfolio id, and it comes first because almost every later link is scoped to it. Once you have it:

PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m adscooking connect --business-id <ID>

Now each step lands in the right portfolio instead of sending them hunting, which is where the time goes. Add --page-id and --app-id as those appear, and re-run again. Re-running never overwrites anything.

Two of the steps give the Business Settings root and then the sidebar clicks, rather than a direct link. That is deliberate: Meta renames those sections and moves them between Business Manager and Business Suite, and a link that 404s wastes the same time as no link. Read the sidebar path out loud rather than inventing a URL.

What only they can do

Nine steps print; five of them are unavoidably the user's, and none should be automated or worked around:

  • Accepting the developer terms. A legal agreement.
  • Accepting the non-discrimination advertising policy when creating the system user.
  • Typing their password when creating the app.
  • Generating the token. Shown once, never again.
  • Turning the ads on at the very end, in Ads Manager.

Walk ${CLAUDE_PLUGIN_ROOT}/context/connecting-your-account.md with them one step at a time rather than pasting the whole thing. The order matters and Meta's errors do not explain it.

Say this, in these words or close to them:

Meta will show the token once. Copy it straight into the .env file after META_SYSTEM_USER_TOKEN=. Do not paste it into this chat, a document, or anywhere else. If it ends up somewhere it should not, regenerate it and the old one dies.

They also fill in two more values in .env:

  • META_AD_ACCOUNT_ID from Ads Manager, top left. The number in the panel text, not the selected_asset_id in the URL. The URL number is an internal wrapper and produces confusing errors later.
  • META_PAGE_ID from the Facebook Page, Settings, About.

Using the browser to find the ids

Reading id numbers out of Business Settings is the tedious half and it is safe to help with. If Claude in Chrome is available, offer it, and keep it to reading:

Allowed. Open and read https://business.facebook.com/settings/info for the Business Portfolio id, the Ads Manager page for the ad account id, and the Page's About tab for the Page id. Report the numbers back and put them in the connect flags.

Never. Do not drive the token screen, do not click Generate token, do not click any Accept or Save on a terms or consent page, do not touch a password field, and do not read a page that is displaying the token. Those steps are the user's by design, and a browser agent that reads the token screen puts the token into a transcript, which is the one leak here that cannot be undone.

If the browser gets stuck, or a page needs a login, stop and hand it back rather than retrying.

Finish

PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m adscooking check

Do not stop until it is clean. It ends by printing the token's expiry date. Read that date out and tell them to write it down, because the two kinds of token fail completely differently: a 60-day one stops every command here on a predictable date while the ads keep running, and a never-expiring one stays a live key to their ad spend until somebody revokes it. /ads-cooking:pulse warns 14 days out, but only while the token still works.

What not to do

  • Do not ask them to paste the token into chat, and do not read .env back to them.
  • Do not create the config folder by hand. connect does it, and it is the only path that checks git and sets the file permissions.
  • Do not carry on if the git check says STOP. A token in git history cannot be taken back.

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.