agentleFS
dmzoneilldmzoneill/skills/create-mr/SKILL.md

create-mr

Skill2 starsChanged 19 days agoApache-2.0View on GitHub

Create a merge request with full validation - commit format, black/flake8, merge conflicts, Jira link, reviewer suggestions. Use when user says "create MR", "open PR", "open merge request".

  • Commits and pushes

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Test merge: git merge --no-commit --no-ff origin/main then --abort

    line 37
  2. Very specific:

    Run black --check . (or black .

    line 46
  3. Very specific:

    Run flake8 --max-line-length=100 --ignore=E501,W503,E203 on changed *.py

    line 47
  4. Very specific:

    If not draft: jira_set_status(issue_key, "In Review")

    line 63

≈ “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

Create Merge Request

Inputs

InputTypeDefaultPurpose
issue_keystringrequiredJira issue key for linking
repostring""Repo path; resolved from issue key if empty
repo_namestring-Config repo name
draftbooltrueCreate as draft MR
target_branchstring""Target branch (default from config)
run_lintingbooltrueRun black/flake8 before MR
check_jiraboolfalseRun jira_hygiene first
auto_fix_lintboolfalseAuto-fix with black
slack_formatboolfalseSlack link format
check_docsboolfalseRun update_docs check
skip_docs_warningboolfalseSkip docs warnings
run_precommitboolfalseRun pre-commit hooks

Workflow

1. Bootstrap

  • persona_load("developer")
  • check_known_issues("gitlab_mr_create"), check_known_issues("git_push")
  • Resolve repo via scripts.common.repo_utils.resolve_repo

2. Pre-flight

  • git_status(repo) — block if uncommitted changes, detached HEAD, or on main/master
  • Validate branch name: ^aap-[0-9]{3,6} (required by CI)
  • Fetch origin (subprocess or git_fetch)
  • git_log(repo, limit=20, oneline=true) — validate commit format via config.json commit_format
  • Test merge: git merge --no-commit --no-ff origin/main then --abort
  • gitlab_list_mrs(project) — detect duplicate MR for branch

3. Knowledge & Reviewers

  • Suggest reviewers: git blame on changed *.py files
  • knowledge_query(project, section="patterns.coding")
  • code_search(query=branch_name + " implementation", project, limit=3)

4. Linting (if run_linting)

  • Run black --check . (or black . if auto_fix_lint)
  • Run flake8 --max-line-length=100 --ignore=E501,W503,E203 on changed *.py
  • Block MR creation if lint fails

5. Docs (if check_docs)

  • skill_run("update_docs", '{"repo": "...", "check_only": true}') — warn only, non-blocking

6. Jira & Create

  • jira_view_issue(issue_key)
  • If check_jira: skill_run("jira_hygiene", '{"issue_key": "...", "auto_fix": true}')
  • Push: git push -u origin branch (subprocess or git_push)
  • Build MR title from format_commit_message (config.json)
  • Build description: summary, Jira link, commits, suggested reviewers, related code, patterns
  • gitlab_mr_create(project, title, description, target_branch, source_branch, draft)

7. Post-create

  • jira_add_comment(issue_key, "MR created: {url}\nBranch: {branch}\nStatus: Draft/Ready")
  • If not draft: jira_set_status(issue_key, "In Review")
  • skill_run("notify_mr", '{"mr_id": X, "issue_key": "..."}')
  • jira_attach_session(issue_key, include_transcript=false)

8. Memory

  • memory_session_log("Created MR !X for AAP-Y", url)
  • memory_append("state/current_work", "open_mrs", item) — id, project, title, url, issue_key, pipeline_status, needs_review, is_draft, created

9. Failure Learning

  • "no such host" → learn_tool_fix("gitlab_mr_create", "no such host", "VPN not connected", "Run vpn_connect()")
  • "unauthorized" → learn_tool_fix("gitlab_mr_create", "unauthorized", "Token expired", "Check config.json")
  • "conflict" → learn_tool_fix("git_merge", "conflict", "Merge conflicts", "skill_run('rebase_pr', ...)")

Key MCP Tools

  • persona_load, git_status, git_log, git_push, gitlab_list_mrs, gitlab_mr_create
  • jira_view_issue, jira_add_comment, jira_set_status, jira_attach_session
  • code_search, knowledge_query, check_known_issues, learn_tool_fix
  • memory_session_log, memory_append, skill_run

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.