Skip to content

Commit c4c14c6

Browse files
committed
chore: scaffold github setup skill
0 parents  commit c4c14c6

15 files changed

Lines changed: 1185 additions & 0 deletions

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* text=auto eol=lf
2+
*.md text eol=lf
3+
*.sh text eol=lf
4+
LICENSE text eol=lf

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
6+
7+
## Unreleased
8+
9+
- Initial scaffold for the git-setup-skill.
10+
- Expanded `references/` with decision criteria for licenses, GitHub Actions, releases, repo metadata, templates, testing, triggers, and workflow.
11+
- Rewrote `SKILL.md` so the skill behaves more like an advisor with explicit heuristics, tradeoffs, and safer defaults.

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Contributing
2+
3+
Thanks for helping improve this skill.
4+
5+
## Workflow
6+
7+
1. Create a branch for your change.
8+
2. Keep changes focused and small.
9+
3. Update `README.md` and `SKILL.md` when behavior changes.
10+
4. Add or update references under `references/` when needed.
11+
12+
## Style
13+
14+
- Prefer concise, actionable instructions.
15+
- Avoid placeholders when repo facts are available.
16+
- Keep templates generic and safe.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# github-setup-skill
2+
3+
[![Release](https://img.shields.io/github/v/release/fxckcode/github-setup-skill?sort=semver)](https://github.com/fxckcode/github-setup-skill/releases)
4+
[![License](https://img.shields.io/github/license/fxckcode/github-setup-skill)](LICENSE)
5+
[![Last Commit](https://img.shields.io/github/last-commit/fxckcode/github-setup-skill)](https://github.com/fxckcode/github-setup-skill/commits/main)
6+
7+
Current version: v0.1.0
8+
9+
Skill experta en preparar el setup basico de repositorios Git/GitHub: `.gitignore`, `.gitattributes`, README con valor, licencias, metadata del repo, tags y releases, y GitHub Actions profesionales con testing.
10+
11+
## Purpose
12+
13+
La skill reemplaza configuraciones ad-hoc con un flujo guiado que:
14+
15+
- revisa el repo antes de escribir
16+
- pregunta solo lo necesario
17+
- crea o refina archivos base de calidad
18+
- añade automatizaciones con GitHub Actions
19+
- deja reglas claras para releases y tags
20+
21+
## Skill Files
22+
23+
- `SKILL.md`
24+
- `references/triggers.md`
25+
- `references/workflow.md`
26+
- `references/templates.md`
27+
- `references/github-actions.md`
28+
- `references/releases.md`
29+
- `references/licenses.md`
30+
- `references/repo-metadata.md`
31+
- `references/testing.md`
32+
- `scripts/README.md`
33+
34+
## Install
35+
36+
Copia esta carpeta dentro de tu directorio de skills. Ejemplo:
37+
38+
```bash
39+
cp -R git-setup-skill "$HOME/.agents/skills/git-setup-skill"
40+
```
41+
42+
## Usage
43+
44+
Frases de activacion tipicas:
45+
46+
- "necesito un buen .gitignore"
47+
- "quiero un README con valor"
48+
- "configura GitHub Actions"
49+
- "prepara releases y tags"
50+
- "ponle licencia al repo"
51+
52+
## What it produces
53+
54+
- `.gitignore` y `.gitattributes` adecuados al stack
55+
- `README.md` con secciones utiles
56+
- `LICENSE` segun la licencia elegida
57+
- `CODE_OF_CONDUCT.md` / `SECURITY.md` si aplica
58+
- workflows de GitHub Actions para CI y releases
59+
- metadata del repositorio (descripcion, topics)
60+
61+
## Compatibility
62+
63+
- Requiere `git` y `gh` para tareas de metadata y releases.
64+
- En Windows, usa una shell compatible con `bash` si se agregan scripts.
65+
66+
## Contributing
67+
68+
Ver `CONTRIBUTING.md`.

SKILL.md

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
---
2+
name: git-setup-skill
3+
description: Prepares Git/GitHub repositories with .gitignore, .gitattributes, README files, licensing, metadata, tags, releases, and GitHub Actions. Use when the user wants to set up or professionalize a repository, add documentation or licensing, configure CI, or prepare releases and repo metadata.
4+
---
5+
6+
# Git Repo Setup
7+
8+
Use this skill when the user wants to professionalize a Git/GitHub repository. The skill should inspect before writing, infer as much as possible from the repo, and behave like a technical advisor: not just generating files, but recommending decisions with clear reasoning.
9+
10+
## What This Skill Owns
11+
12+
- Inspecting the repo before proposing changes
13+
- Classifying the project type: library, app, CLI, template, internal repo, or demo
14+
- Creating or refining `.gitignore` and `.gitattributes`
15+
- Generating or improving `README.md` with useful content
16+
- Recommending and adding an appropriate license
17+
- Configuring repository metadata: description, topics, and homepage when relevant
18+
- Configuring GitHub Actions for CI and releases when they make sense
19+
- Evaluating community health files such as `CODE_OF_CONDUCT.md`, `SECURITY.md`, and issue/PR templates
20+
- Guiding tags and releases with `git` and `gh`
21+
22+
## Primary Use Cases
23+
24+
- "I need a good .gitignore and README"
25+
- "set up GitHub Actions for tests"
26+
- "I want professional releases and tags"
27+
- "add a license and description to the repo"
28+
- "let's make this repo GitHub-ready"
29+
- "prepare this repo for open source"
30+
31+
## Workflow
32+
33+
For full repository setups, follow this checklist:
34+
35+
- Inspect the repository structure
36+
- Identify project type and maturity
37+
- Detect stack, language, runtime, test runner, and package manager
38+
- Review existing files: `README.md`, `.gitignore`, `.gitattributes`, `.github/`, `LICENSE`, `CHANGELOG.md`
39+
- Confirm project purpose, audience, and expected visibility if that cannot be inferred
40+
- Choose a license based on reasoning, not popularity
41+
- Draft or refine the README with sections that match the project type
42+
- Define GitHub Actions only with real commands from the repo
43+
- Configure repository metadata aligned with the README and intended use
44+
- Evaluate community health files if the project is likely to receive external collaboration
45+
- Define a tags and releases strategy only when appropriate
46+
- Report changes, decisions, assumptions, and open follow-ups
47+
48+
## Required Questions
49+
50+
Ask only when the answer cannot be inferred:
51+
52+
- What the project does and who it is for
53+
- Language/runtime and test/build commands
54+
- Desired license type when there is uncertainty
55+
- Whether the user wants CI, release automation, or both
56+
- Initial version and release strategy
57+
- Whether `CODE_OF_CONDUCT.md` or `SECURITY.md` should be created
58+
59+
Ask explicitly if you detect:
60+
61+
- potential need for non-trivial licenses such as `AGPL`, `LGPL`, `MPL`, dual licensing, or non-open-source licenses
62+
- corporate, academic, or client context that may require legal approval
63+
- a monorepo or structure where it is unclear whether there should be one workflow or several
64+
65+
## Writing Rules
66+
67+
- Never overwrite user files without reviewing their contents
68+
- Prefer section merges for README and existing docs
69+
- If the stack is unclear, ask for confirmation
70+
- Avoid placeholders when the repo already provides real facts
71+
- If something is an assumption, label it as such
72+
- Do not invent `lint`, `test`, or `build` commands
73+
- Do not default to `MIT` mechanically if there is enterprise context, patent sensitivity, or a clear copyleft preference
74+
- Do not add generic `SECURITY.md` or community files if nobody will maintain them
75+
- Do not create release automation if there is no release strategy yet
76+
77+
## File Strategy
78+
79+
Use this section for defaults only. For deeper decision-making, read the relevant file under `references/`.
80+
81+
### `.gitignore`
82+
83+
- Base it on the detected language, framework, and tooling
84+
- Include build folders, caches, and local-only files
85+
- Avoid ignoring configuration files the project actually needs
86+
- Remember that team-wide ignores belong in `.gitignore`, while personal ignores can go in `.git/info/exclude` or a global ignore file
87+
88+
### `.gitattributes`
89+
90+
- Use `text=auto eol=lf` as a good cross-platform default
91+
- Mark binaries and files that need special normalization
92+
- Adjust `eol` by file type if the repo is strongly Windows-centric
93+
- Add `linguist-*` rules only when the repository truly needs them
94+
95+
### `README.md`
96+
97+
Include minimum sections:
98+
99+
- Clear summary
100+
- Features or use cases
101+
- Install / setup
102+
- Usage
103+
- Testing
104+
- License
105+
106+
Then adapt by project type:
107+
108+
- library: short usage example
109+
- CLI/app: run command and requirements
110+
- template: what the user must customize
111+
- internal repo: onboarding and operational conventions
112+
113+
### `LICENSE`
114+
115+
- Use the correct template for the chosen license
116+
- Add `year` and `copyright holder` when the user specifies them or they can be inferred with high confidence
117+
- If there is no license and the repo will be public, explain that the code is not automatically reusable
118+
- Recommend:
119+
- `MIT` for simplicity and adoption
120+
- `Apache-2.0` when explicit patent protection is useful
121+
- `GPL-3.0` only when there is a clear copyleft preference
122+
- If the legal case is ambiguous, escalate to the user instead of assuming
123+
124+
### GitHub Actions
125+
126+
- CI: push and pull request using real commands
127+
- Release: tag + `gh release create` or a tag-triggered workflow when appropriate
128+
- Use cache according to the actual package manager
129+
- Set minimal `permissions`
130+
- Separate CI and release workflows when both exist
131+
- Avoid unnecessary matrices and avoid `pull_request_target` unless there is a clear need
132+
133+
### Repo Metadata
134+
135+
- Define a short description and useful topics
136+
- Keep the README aligned with the description
137+
- Use 3 to 8 truthful, specific topics
138+
- Consider homepage and community health files if the repo will be externally visible
139+
140+
## GH CLI Guidance
141+
142+
When the user wants metadata or releases, use `gh`:
143+
144+
- `gh repo edit --description "..." --add-topic "..."`
145+
- `gh repo edit --homepage "https://..."`
146+
- `gh release create vX.Y.Z --generate-notes`
147+
148+
Avoid destructive or forceful git operations.
149+
150+
## When To Read References
151+
152+
- `references/triggers.md` for activation phrases
153+
- `references/workflow.md` for the base operational flow
154+
- `references/templates.md` for reusable snippets and quality criteria
155+
- `references/github-actions.md` for CI, security, and release automation
156+
- `references/releases.md` for tags and versioning
157+
- `references/licenses.md` for license selection with real tradeoffs
158+
- `references/repo-metadata.md` for description, topics, and community health files
159+
- `references/testing.md` for validating the quality of the skill
160+
161+
Use these references as decision guides, not just as a checklist.
162+
163+
## Success Criteria
164+
165+
- Baseline files are created or improved without risky overwrites
166+
- The README is clear, actionable, and aligned with the project
167+
- CI works for the actual stack
168+
- The license is correct or the recommendation is well justified
169+
- Repository metadata is aligned with the project
170+
- Recommendations are justified when tradeoffs exist
171+
- Nothing important is invented or assumed without being marked
172+
173+
## Output Expectations
174+
175+
At the end, report:
176+
177+
- files created
178+
- files updated
179+
- files skipped
180+
- key decisions: license, CI, releases, and metadata
181+
- assumptions and follow-ups for the user

0 commit comments

Comments
 (0)