permissioned-github
Skill3 starsChanged 2 months agoMITView on GitHub
Guidelines for interacting with GitHub and request permissions from the user when commands fail due to restrictions in the agent environment.
- Commits and pushes
In this repository46 other files it gives its agents.
- agy-customizationsSkill
- antigravity-guideSkill
- api-and-interface-designSkill
- browser-testing-with-devtoolsSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code_reviewSkill
- code-simplificationSkill
- context-engineeringSkill
- create_launcherSkill
- create_skillSkill
- daily_logSkill
- debugging-and-error-recoverySkill
- debug_issueSkill
- deprecation-and-migrationSkill
- document_apiSkill
- documentation-and-adrsSkill
- enhance_uiSkill
- frontend_designSkill
- frontend-ui-engineeringSkill
- generate_release_imageSkill
- git-workflow-and-versioningSkill
- idea-refineSkill
- idea_to_actionSkill
- impeccableSkill
- incremental-implementationSkill
- list_featuresSkill
- open_source_prepSkill
- optimize_codebaseSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- release_helperSkill
- repo_infographicSkill
- scaffold_testsSkill
- security-and-hardeningSkill
- security_auditSkill
- shipping-and-launchSkill
- software_architectureSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- test_runnerSkill
- ui_ux_pro_maxSkill
- update_docsSkill
- using-agent-skillsSkill
- using-ui-stackSkill
- web_performance_optimizationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Use the gh CLI. Always set the -R ORG/REPO argument.
- Distinctive: line 18
Do not use other commmands like curl.
- Distinctive: line 19
Do not write scripts to interact with the GitHub API servers directly.
- Distinctive: line 23
Use the git command.
- Very specific: line 41
read: to view PR details, and to run gh search prs.
- Distinctive: line 43
update: to comment, review, edit, close, reopen, etc.
- Very specific: line 53
read: to clone, pull, fetch, checkout, and to run gh search commits.
- Very specific: line 54
Always set branch to * for read.
- Distinctive: line 55
create: to push a new branch.
- Distinctive: line 56
update: to push to an existing remote branch (including force-push).
- Distinctive: line 57
delete: to delete a remote branch.
- Distinctive: line 140
When you have determined that you need permisison:
- Very specific: line 143
Call the tool ask_permission:
- Distinctive: line 146
Do not set BypassSandbox.
- Distinctive: line 148
Run the original command that was denied.
≈ “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.
Files
GitHub Skill
This skill describes how to interact with GitHub and request the permissions to perform actions that are not authorized by default in the agent environment. This skill is authoritative for the usage of the gh CLI and git command.
By default, the agent is restricted to performing only a subset of actions on GitHub.
How to Interact with GitHub
To perform actions on GitHub:
- Use the gh CLI. Always set the
-R ORG/REPOargument. - Do not use other commmands like curl.
- Do not write scripts to interact with the GitHub API servers directly.
To perform branch operations (e.g., push):
- Use the git command.
Asking for Permissions
Permission Format
The permission format is as follows:
<command-binary>.<action>(<resource_json>)resource_json has the following fields:
- org: Mandatory GitHub organization. Use '*' to indicate all organizations.
- repo: Mandatory GitHub repository. Use '*' to indicate all repositories.
- pr: Optional pull request number. Use '*' to indicate all pull requests.
Supported actions:
- read: to view PR details, and to run
gh search prs. - create
- update: to comment, review, edit, close, reopen, etc.
- approve
- merge
- read: to view PR details, and to run
- issue: Optional issue number. Use '*' to indicate all issues.
Supported actions:
- read
- create
- update: to comment, review, edit, close, reopen, etc.
- branch: Mandatory branch name. Use '*' to indicate all branches.
Supported actions:
- read: to clone, pull, fetch, checkout, and to run
gh search commits. Always setbranchto*forread. - create: to push a new branch.
- update: to push to an existing remote branch (including force-push).
- delete: to delete a remote branch.
- read: to clone, pull, fetch, checkout, and to run
Other operations are not supported and the corresponding permission will not be granted. If you need support, stop immediately and tell the user you cannot proceed and why.
Examples
Example 1: Creating an Issue
Command: gh issue create --title "Bug report" --body "Description" -R myorg/myrepo
Permission: gh.create({"org": "myorg", "repo": "myrepo", "issue": "*"})
Note: keep the permission lean and don't populate empty fields
Example 2: Commenting on a PR
Command: gh pr comment 123 --body "Looks good" -R myorg/myrepo
Permission: gh.update({"org": "myorg", "repo": "myrepo", "pr": "123"})
Note: keep the permission lean and don't populate empty fields
Example 3: Closing an Issue
Command: gh issue close 123 --comment "closing issue" -R myorg/myrepo
Permission: gh.update({"org": "myorg", "repo": "myrepo", "issue": "123"})
Note: keep the permission lean and don't populate empty fields
Example 4: Approving a PR
Command: gh pr review 123 --approve --body "Looks good" -R myorg/myrepo
Permission: gh.approve({"org": "myorg", "repo": "myrepo", "pr": "123"})
Note: keep the permission lean and don't populate empty fields
Example 5: Pushing to an Existing Branch
Command: git push origin feature/my-feature (branch already exists on the remote)
Permission: git.update({"org": "myorg", "repo": "myrepo", "branch": "feature/my-feature"})
Note: use update for a force-push too; use create (below) when the branch does not yet exist on the remote.
Example 6: Creating a New Branch
Command: git push origin feature/my-feature (first push of a branch that does not exist on the remote)
Permission: git.create({"org": "myorg", "repo": "myrepo", "branch": "feature/my-feature"})
Example 7: Fetching all branches
Command: git fetch --all
Permission: git.read({"org": "myorg", "repo": "myrepo", "branch": "*"})
_Note: read cannot be scoped to a single branch; branch must be _.*
Example 8: Cloning a Repository
Command: git clone https://github.com/myorg/myrepo.git
Permission: git.read({"org": "myorg", "repo": "myrepo", "branch": "*"})
Example 9: Deleting a Branch
Command: git push origin --delete feature/my-feature
Permission: git.delete({"org": "myorg", "repo": "myrepo", "branch": "feature/my-feature"})
Note: keep the permission lean and don't populate empty fields
Example 10: Searching Pull Requests
Command: gh search prs -R myorg/myrepo --author alice
Permission: gh.read({"org": "myorg", "repo": "myrepo", "pr": "*"})
_Note: for an organization-wide search, use --owner myorg in the command; the grant then uses repo: "_".*
Example 11: Searching Commits
Command: gh search commits -R myorg/myrepo --author alice
Permission: git.read({"org": "myorg", "repo": "myrepo", "branch": "*"})
Note: commit search reuses the git read permission, so request a git._grant, not agh._ grant.
How and When to Ask for Permissions
You should only ask for permissions if the command failed. Each time you ask for a permission, it will prompt the user. Be mindful to only ask when you know the command fails to provide a good user experience.
When you have determined that you need permisison:
- Constuct the permission string
<permission-string>as per previous section. - Call the tool
ask_permission:
- Set Action="custom", Target=
<permission-string> - Do not set BypassSandbox.
- Run the original command that was denied.
Never try to pipe or redirect output of the gh command, it will not work in your environment
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
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.

