OpenCoze
Back to template library

End-to-End Workflow: Generate Code with GitHub Copilot CLI a

DevelopmentCozeUpdated 2026-04-11

Automatically generate code, commit, push, and create a Pull Request using GitHub Copilot CLI to boost developer productivity.

System Prompt
Generate GitHub Copilot CLI commands to implement {feature_description} in repository {repo_path}, commit with message {commit_message}, push to branch {target_branch}, and create a PR with reviewer {reviewer}. Output the full shell script.

Variable Dictionary (fill in your AI tool)

This section only explains placeholders. It is not an input form on this website. Copy the prompt, then replace variables in Coze / Dify / ChatGPT.

{repo_path}

Local Git repository path

Filling hint: replace this with your real business context.

{feature_description}

Feature to implement

Filling hint: replace this with your real business context.

{commit_message}

Commit message

Filling hint: replace this with your real business context.

{target_branch}

Target branch name

Filling hint: replace this with your real business context.

{reviewer}

GitHub reviewer username

Filling hint: replace this with your real business context.

Quick Variable Filler (Optional)

Fill variables below to generate a ready-to-run prompt in your browser.

{repo_path}

Local Git repository path

{feature_description}

Feature to implement

{commit_message}

Commit message

{target_branch}

Target branch name

{reviewer}

GitHub reviewer username

Generated Prompt Preview

Missing: 5
Generate GitHub Copilot CLI commands to implement {feature_description} in repository {repo_path}, commit with message {commit_message}, push to branch {target_branch}, and create a PR with reviewer {reviewer}. Output the full shell script.

How to Use This Template

Best for

Teams that need faster development output with more stable prompt quality.

Problem it solves

Reduces blank-page time, missing constraints, and inconsistent output structure from ad-hoc prompting.

Steps

  1. Copy the template prompt.
  2. Paste it into your AI tool (Coze / Dify / ChatGPT).
  3. Replace placeholder variables using the dictionary above.
  4. Run and refine constraints based on output quality.

Not ideal when

You need live web retrieval, database writes, or multi-step tool orchestration. Use full workflow automation for that.

Success Case

Input:
repo_path: /home/user/project, feature_description: "Implement user login", commit_message: "Add login feature", target_branch: "feature/login", reviewer: "alice"
Output:
copilot generate Implement user login git add . git commit -m "Add login feature" git push origin feature/login gh pr create --base main --head feature/login --reviewer alice --title "Add login feature"

Boundary Case

Input:
repo_path: /home/user/project, feature_description: "", commit_message: "", target_branch: "", reviewer: ""
Fix:
Make sure all variables are supplied before executing the workflow.

What to Try Next

Keep exploring with similar templates and matching tools.

Continue Where You Left Off

No recent items yet.

Workflow Steps

  1. 1. Navigate to {repo_path} and run `copilot generate {feature_description}` to generate code.

  2. 2. Stage changes with `git add .` and commit using `git commit -m "{commit_message}"`.

  3. 3. Push to remote: `git push origin {target_branch}`.

  4. 4. Create a PR with GitHub CLI: `gh pr create --base main --head {target_branch} --reviewer {reviewer} --title "{commit_message}"`.

Constraints

  • Network outages will cause push and PR creation to fail.
  • If the target branch already exists, git push may conflict.

Explore More in This Category

Development

Recommended Stack

Tools that work well with this template.

OpenAI

Official site

General LLM platform for generation, analysis, and development use cases.

Open