Skip to content

feat: /create-repository - #34

Open
tmikula-dev wants to merge 9 commits into
masterfrom
feature/repository-creation-skill
Open

feat: /create-repository#34
tmikula-dev wants to merge 9 commits into
masterfrom
feature/repository-creation-skill

Conversation

@tmikula-dev

@tmikula-dev tmikula-dev commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Overview

This pull request introduces the new create-repository skill, which automates the creation and configuration of GitHub repositories under the AbsaOSS (open source) or absa-group (internal) organizations. The skill runs an interactive interview, generates an annotated gh command plan, and executes it upon user confirmation, ensuring that all standard settings, labels, rules, and project links are applied consistently. The PR also adds robust documentation, a reusable ruleset asset, and evaluation scenarios to guide and test the skill.

Key Changes

  • Adding the /create-repository skill with our Absa guardrails and best practices
  • Adding the PR template to the repo

Related

Closes #https://github.com/absa-group/cps-organizational/issues/36

@tmikula-dev tmikula-dev self-assigned this Jul 23, 2026
@tmikula-dev tmikula-dev added the enhancement New feature or request label Jul 23, 2026
@tmikula-dev
tmikula-dev requested a review from HuvarVer July 23, 2026 13:41
@tmikula-dev tmikula-dev changed the title /create-repository Feat: /create-repository Jul 23, 2026
@tmikula-dev tmikula-dev changed the title Feat: /create-repository feat: /create-repository Jul 23, 2026
Comment thread skills/create-repository/SKILL.md Outdated

Run `gh auth status`. If it exits non-zero, **stop immediately** and tell the user:

> This skill needs an authenticated GitHub CLI with org-admin permissions for AbsaOSS / absa-group.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if the permissions that are needed are org-admin, its really high permission category.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, change done in d395a5d

### 4. Code owners (OSS repos only, ≥1 user)

**Only ask this for open source (`AbsaOSS`) repos.** Internal (`absa-group`) repos keep the template's
empty `CODEOWNERS`. An always-on org-level ruleset **prohibits committing straight to the default branch**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the CODEOWNERS file for internal repositories empty in this step?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is because CSO team added to every internal repository a mandatory Check appid.json file workflow, that is added automatically. But they did not think about option to merge a commit straight without PR. So when we try to modify CODEOWNERS directly, the appid.json check is pending and the change is not possible without PR.

Comment thread skills/create-repository/SKILL.md Outdated
If the `Write a different set of code owners` option is chosen, ask: "Enter the GitHub usernames for
the code owners."

A single global `CODEOWNERS` rule covers all files. Individuals only — no teams.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, teams should be available too.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, added in: d395a5d.

Comment thread skills/create-repository/SKILL.md Outdated
gh api -X PATCH repos/{owner}/{name} -F delete_branch_on_merge=true
```

8. Link the repository to project number {number} (https://github.com/orgs/absa-group/projects/{number}). ← private repos only (one block per project); omit otherwise

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should automatically ask for adding the scope if the user token doesn't have it:
gh auth refresh -s read:project

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, this skill should do only repository creation scoped commands. If person does not have permission to add it to the absa-group project, then someone with correct permission should do it instead.

This command is refreshing existing login token and requesting extra permission, which can be overlooked by skill user and cause not wanted outcomes.

| Core Branches ruleset | ✓ |
| Auto-delete branches on merge | ✓ |

Template: https://github.com/absa-group/cps-repository-template

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am missing the information in this summary about which files are copied from the template repository. I think it can be useful for the user to know exactly what he created.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I added under Template another row called: Files copied from the template. See commit: d395a5d

@miroslavpojer miroslavpojer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls, see and fix found review comments.

TODO - I am also missing skill guide present and linked in doc folder.

Creates and configures a brand-new GitHub repository under the Absa organizations: AbsaOSS (open source)
or absa-group (internal). Runs a short interactive interview, then an annotated gh command plan that
creates the repo from the shared cps-repository-template (copies file structure) and, as part of that setup,
adds theApache-2.0 license and populated CODEOWNERS file (open source repos), the standard Absa

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
adds theApache-2.0 license and populated CODEOWNERS file (open source repos), the standard Absa
adds the Apache-2.0 license and populated CODEOWNERS file (open source repos), the standard Absa

set up a new repository, project, codebase, or service repo under AbsaOSS or absa-group. Even if they don't
say "repository" explicitly. Do NOT use for modifying an existing repo (adding a single label, granting
access on a repo that already exists, creating branches, pull requests, issues, or workflow files, or
cloning). Use only for creating a new repository from scratch.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inwoiuld add Triggers on: 'create repository', 'new repo', 'spin up a repo', ..."

that literal order, every time. For example (an OSS repo — no project-link row):

```
Repository `cps-test-repo` successfully created via /create-repository skill

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan runs multiple sequential gh API calls (CODEOWNERS fetch, label clone, ruleset POST, project link GraphQL queries). For high-frequency use or edge cases, GitHub API rate limits could be hit. Consider noting this or adding defensive error handling guidance in the Execute section.

```
Repository `cps-test-repo` successfully created via /create-repository skill

| Step | Result |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In would also add example when some step fail and describe how to handle it.

  • back off to manual finish - provide commands and support user
  • try retry

code — the sentence goes above the block, the command goes in the block. Keep each description to one short
sentence; the user will ask if something is unclear.

```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this line, it damages page format s reverse code sections.


8. Set the required org custom properties to placeholder values. ← private repos only; omit the whole step otherwise
```
gh api -X PATCH repos/{owner}/{name}/properties/values --input {skill-dir}/assets/custom-properties.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line references {skill-dir}/assets/custom-properties.json for setting custom properties on internal repos, but this file does not exist in the assets/ directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants