How MapSense works
MapSense turns pull requests into posts so people can learn from real AI-assisted software work. You connect repos, MapSense watches PR activity through a GitHub App, and each PR becomes a post with either the original prompt or a best-effort reconstructed one.
1. Sign in with GitHub
GitHub OAuth is used for identity and login. That gives MapSense your account context, but repo access is handled separately through the GitHub App.
2. Install the MapSense GitHub App
The GitHub App gives MapSense installation-scoped access only to the repos or orgs where you install it. After that, you choose which repos are active inside MapSense.
3. Connect the repos you want to use
In Repos, you can enable or disable individual repositories. Public repos can auto-publish by default. Private repos are safer with manual review.
4. Open or merge a pull request
When GitHub sends a PR webhook, MapSense creates a pending post and fetches the PR title, body, commit messages, and changed files.
5. MapSense looks for an embedded prompt first
If you already included your real prompt in the PR description or commits, MapSense tries to extract that directly. That is the best case because it preserves your actual workflow.
6. If no prompt is found, MapSense reconstructs one
If there is no embedded prompt, MapSense filters the diff to keep the meaningful parts and uses an LLM to generate the prompt that would likely have produced the changes.
7. The PR becomes a post in the feed
Once the prompt is extracted or generated, the post is published to the feed. Other developers can read it, like it, comment on it, bookmark it, and visit the original PR for context.
8. Or post from the CLI
The automatic webhook pipeline is the default, but you can also post from your terminal using the MapSense CLI. This gives you full control over which PRs to post, lets you use your own LLM for higher-quality prompts, and integrates directly with coding agents.
# Install nothing — npx runs it directly
npx mapsense login
npx mapsense post #12
The CLI fetches the latest prompt template from MapSense, grabs the PR diff from GitHub, generates a post with your LLM (Anthropic, OpenAI, or OpenRouter), and publishes it to your feed.
You can also skip the LLM entirely and write your own post text:
npx mapsense post #12 --prompt "Add connection pooling to the DB layer" --yes
The --yes flag skips confirmation, making it ideal for coding agents.
Tell your Claude Code or Codex session "post this PR to MapSense" and it handles the rest.
CLI + agent integration
Coding agents like Claude Code and Codex already have a powerful LLM running. They can generate the post text themselves using the MapSense prompt template, then publish via the CLI or call the API directly.
GitHub Actions
# .github/workflows/mapsense.yml
on:
pull_request:
types: [closed]
jobs:
post:
if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- run: npx mapsense post ${{ github.event.pull_request.html_url }} --yes
env:
MAPSENSE_TOKEN: ${{ secrets.MAPSENSE_TOKEN }}
Why this is useful
- See how other developers actually use AI on real code
- Learn prompting patterns from shipped work, not toy demos
- Share your own workflow without writing a separate case study
- Keep the original PR as the source of truth and context
Important note about private repos
Private repos need more care. They are not auto-published by default, and if you use hosted prompt generation, PR-derived data may be sent to model providers. Read the Privacy & FAQ page before using private repositories.