agentleFS
yuchenmiao04yuchenmiao04/My_skills/skills/engineering/github-codex-key/SKILL.md

github-codex-key

Skill8 starsChanged 5 months agoMITView on GitHub

Use when working with GitHub from Codex or another coding agent, including testing SSH auth, cloning, pulling, pushing, setting git remotes, or retrieving a configured public SSH key.

  • Reads credentials
  • Commits and pushes

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    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
  • could be automatic: a setting could enforce it
  1. Very specific:

    Use an SSH key dedicated to coding-agent GitHub operations.

    line 8
  2. Distinctive:

    When the user asks for the key to add to GitHub, show only the public key:

    line 25
  3. Distinctive:

    If Git does not pick the configured identity, force it for one command:

    line 58
  4. Distinctive:

    Add the public key to GitHub.

    line 82
  5. Distinctive:

    Never print, paste, upload, commit, or summarize private key contents.

    line 90
  6. Very specific:

    Never commit .ssh/, tokens, .env, or credential helper files.

    line 91
  7. Distinctive:

    Use repository-specific deploy keys only when that access model is intended.

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

GitHub Codex Key

Use an SSH key dedicated to coding-agent GitHub operations. Keep the private key local, never print it, and only share the .pub public key when configuring GitHub.

Recommended Key Paths

Choose a local key path and keep it consistent. For example:

  • Private key: ~/.ssh/<agent_github_key>
  • Public key: ~/.ssh/<agent_github_key>.pub
  • SSH host config: ~/.ssh/config

These names are examples. If you publish or share this skill, do not include machine-specific paths, account names, or private key contents.

Retrieve Public Key

When the user asks for the key to add to GitHub, show only the public key:

cat ~/.ssh/<agent_github_key>.pub

Test GitHub Authentication

Use:

ssh -T git@github.com

A successful authentication usually prints a message like:

Hi <username>! You've successfully authenticated, but GitHub does not provide shell access.

The command may still exit nonzero because GitHub does not provide shell access.

Git Remote Usage

Prefer SSH remotes:

git clone git@github.com:OWNER/REPO.git
git remote set-url origin git@github.com:OWNER/REPO.git
git pull
git push

If Git does not pick the configured identity, force it for one command:

GIT_SSH_COMMAND="ssh -i ~/.ssh/<agent_github_key> -o IdentitiesOnly=yes" git push

If Auth Fails

  1. Confirm the key files exist.
ls -l ~/.ssh/<agent_github_key> ~/.ssh/<agent_github_key>.pub
  1. Confirm ~/.ssh/config has an entry similar to:
Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/<agent_github_key>
  IdentitiesOnly yes
  1. Add the public key to GitHub.

GitHub Settings -> SSH and GPG keys -> New SSH key

  1. Retest with ssh -T git@github.com.

Safety Rules

  • Never print, paste, upload, commit, or summarize private key contents.
  • Never commit .ssh/, tokens, .env, or credential helper files.
  • Use repository-specific deploy keys only when that access model is intended.

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.