> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Contribute to a GitHub project

> Import a repository from a chat, ask for one small change, check it in a preview, and let Agent open the pull request.

export const Connectors = ({items}) => <div style={{
  margin: "8px 0 20px"
}}>
    <style>{`
      .connectors-list, .connectors-list * { margin-top: 0 !important; margin-bottom: 0 !important; }
      .connectors-row {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 4px 0 !important;
        min-height: 0 !important;
        height: auto !important;
      }
      .connectors-row img {
        width: 20px !important;
        height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
        margin: 2px 0 0 !important;
        display: block !important;
      }
    `}</style>
    <div className="connectors-list">
      {items.map((item, i) => <div key={item.id} className="connectors-row" style={{
  borderTop: i === 0 ? "none" : "1px solid rgba(130,130,130,0.22)"
}}>
          <img src={`/images/connectors/${item.id}.svg`} alt="" width={20} height={20} />
          <div style={{
  minWidth: 0
}}>
            <div>
              <strong>{item.name}</strong>
              {item.why ? <span style={{
  opacity: 0.72
}}> · {item.why}</span> : null}
            </div>
            {item.auth === "api-key" ? <div style={{
  fontSize: "11.5px",
  lineHeight: 1.35,
  color: "#F26207",
  marginTop: "2px"
}}>
                Not a native connector. Agent will ask for your API key.
              </div> : null}
          </div>
        </div>)}
    </div>
  </div>;

export const AiPrompt = ({children}) => {
  return <CodeBlock className="relative block max-w-full overflow-x-hidden font-sans !whitespace-pre-wrap !break-words" style={{
    overflowWrap: "anywhere",
    wordBreak: "break-word"
  }}>
      <div className="pr-7" style={{
    whiteSpace: "pre-wrap",
    overflowWrap: "anywhere",
    wordBreak: "break-word"
  }}>
        {children}
      </div>
    </CodeBlock>;
};

Make a small change to a repository you have write access to, straight from a chat. Import
the repository from the prompt box, ask for the change in plain language, and check it in a
live preview. When it looks right, Agent commits it to a branch, pushes it, and opens the
pull request with the description filled in.

## Best for

* Developers who want to ship changes without setting up a local environment.
* Non-developers who need a small change, like a typo or a copy fix, made without pulling a developer off their work.

## Connectors

<Connectors
  items={[
{
  id: "github",
  name: "GitHub",
  why: "The repository you import, the branch you push to, and the pull request",
},
]}
/>

## Before you start

Pick one small, well-scoped change, and check the project's contributing guide if it has
one. You need write access to the repository, since Agent pushes the branch directly and
opens the pull request from there.

In the prompt box, open the **plus** menu, select **Import an existing project**, choose
**GitHub**, and paste the repository URL. You can also just paste the repository link
directly into the prompt box.

## Prompt the agent

<AiPrompt>
  This is \[Repo link], imported from GitHub. Change the H1 on the home
  page from \[current text] to \[new text]. Keep the project's existing styling
  and copy conventions, don't touch anything else, and show me a preview of the
  page running.
</AiPrompt>

## What to expect

<Steps>
  <Step title="Agent sets the project up">
    It reads the repository, installs dependencies, and asks for anything it
    can't infer, like a missing environment variable.
  </Step>

  <Step title="It finds the right file">
    Not just the matching string, and tells you what it plans to change
    before editing.
  </Step>

  <Step title="It applies the change and opens a preview">
    So you see the real page instead of a diff.
  </Step>

  <Step title="Ask for the pull request">
    Once the preview looks right, ask for it in the same chat. This saves your
    change and sends it to your team as a pull request, so someone can review
    it before it goes live. Confirm your GitHub connection is still active
    first.

    <AiPrompt>
      Commit this change and open a pull request for review. Give it a clear
      title and write the description based on what changed and how I
      checked it.
    </AiPrompt>
  </Step>
</Steps>

You end up with a pull request on the repository, filled in with what changed, why, and how
you checked it. Review the diff yourself before it goes out: reviewers push back on
sprawling changes, so anything unrelated belongs in a separate pull request.

## Make it work for you

<AiPrompt>
  Before you commit, run the project's linter and test suite and show me
  anything that fails. List every file the diff touches and flag anything
  unrelated to \[change].
</AiPrompt>

<AiPrompt>
  A reviewer left these review comments \[paste]. Apply the ones that are
  factual fixes, tell me which ones you disagree with and why, then push to the
  same branch.
</AiPrompt>

## Troubleshooting

<AccordionGroup>
  <Accordion title="The preview won't start">
    The project needs its run command or environment variables. Ask Agent to
    read the contributing guide and the example env file, then tell you exactly
    what's missing.
  </Accordion>

  <Accordion title="The push is rejected">
    Confirm you have write access to the repository and that your GitHub
    connection is still active. Some organizations also restrict branch names
    or require signed commits. Ask Agent to show you the exact error.
  </Accordion>

  <Accordion title="A reviewer asks for changes">
    Commit on the same branch and push again. The pull request updates itself,
    so don't open a second one.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Generate release notes" href="/use-cases/generate-release-notes">
    Turn merged pull requests into notes people can read.
  </Card>

  <Card title="Preview your app" href="/features/editor/preview">
    See changes running live before you open the pull request.
  </Card>
</CardGroup>
