# Github AI Coding Task Dataset Builder (`coolinbex/ai-coding-task-dataset-builder`) Actor

Turn GitHub issues into structured coding-agent tasks with repository context, relevant files, build commands, and ready-to-use prompts.

- **URL**: https://apify.com/coolinbex/ai-coding-task-dataset-builder.md
- **Developed by:** [coolinbex](https://apify.com/coolinbex) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## AI Coding Task Dataset Builder

Turn GitHub issues into structured, agent-ready coding tasks at scale.

The Actor scans repositories or entire GitHub organizations, removes pull requests and low-value issue noise, detects actionable development work, enriches each accepted issue with repository context, and produces a clean dataset for coding agents, evaluations, benchmarks, internal automation, and task-routing pipelines.

### What you get

Each accepted issue becomes one dataset item with:

- repository and issue metadata
- task type and 0–100 task score
- estimated complexity
- primary programming language
- detected frameworks and package managers
- detected ORM/database technologies
- likely affected files with ranking reasons
- build, test, and lint commands when detectable
- agent/contributor instruction file paths
- compact issue + repository context
- a ready-to-use prompt for Codex, Cursor, Claude Code, and similar coding agents
- the repository commit SHA used for the scan

The Actor does **not** execute repository code.

### Quick start

#### Try it without credentials

Run the Actor with its default input.

The default mode uses a built-in demo repository and four demo issues. It performs no GitHub requests and outputs three realistic coding tasks while filtering one support/question issue.

#### Scan repositories

Set **Run mode** to `Live GitHub scan` and add repositories such as:

```text
vercel/next.js
https://github.com/expressjs/express
owner/private-repository
```

For private repositories, add a GitHub token with read access.

#### Scan an organization

Add an organization such as:

```text
microsoft
vercel
sveltejs
```

The Actor expands the organization into repositories, filters forks and archived repositories by default, and scans issues in each selected repository.

You can combine explicit repositories, organizations, and an Apify source dataset in the same run.

### Best use cases

#### Coding-agent task queues

Create a continuously refreshed pool of real GitHub work for autonomous or human-assisted coding agents.

#### Evaluation and benchmark datasets

Use open or closed issues to create reproducible task datasets with stack context, likely files, and build/test commands.

#### Internal engineering automation

Convert issue backlogs into normalized task records for routing, prioritization, triage, or downstream agents.

#### Repository intelligence at scale

Scan many repositories with one consistent output format instead of maintaining repository-specific extraction logic.

### Task filtering

The Actor uses an explainable heuristic score from `0` to `100` to distinguish coding tasks from questions, duplicate reports, support requests, discussions, and other low-actionability issues.

Signals include:

- bug, enhancement, feature, test, security, performance, dependency, CI, and similar labels
- implementation/fix/refactor language
- acceptance criteria and reproduction steps
- technical/code context
- issue detail quality
- negative signals such as question, duplicate, invalid, support, or discussion labels

The default minimum score is **55**. Increase it for a smaller, cleaner dataset; lower it for higher recall.

Every result includes `taskScore` and `taskScoreReasons` so the decision is inspectable.

### Task types

Issues are categorized as one of:

- `bugfix`
- `feature`
- `refactor`
- `tests`
- `performance`
- `security`
- `documentation`
- `dependencies`
- `devops`
- `maintenance`
- `other`

### Relevant-file detection

`filesLikelyAffected` is generated from the repository tree using signals such as:

- paths explicitly mentioned in the issue
- filename/path keyword matches
- task-type-specific repository paths
- implementation, test, dependency, CI, documentation, and security conventions

`relevantFiles` also contains the score and reason for each suggestion.

These paths are guidance for an agent, not a guaranteed ground-truth patch set. The generated prompt explicitly tells agents to inspect the repository before making changes.

### Repository context

For each repository, the Actor reads a small set of high-value files instead of cloning or executing the project. These can include:

- `package.json`
- lockfiles and workspace files
- `pyproject.toml` and requirements files
- `go.mod`, `Cargo.toml`, `pom.xml`, Gradle files
- framework configuration
- Prisma/Drizzle configuration
- Docker/deployment configuration
- CI workflows
- `AGENTS.md`
- `CLAUDE.md`
- Cursor/Copilot-style instruction files

This context is used to detect frameworks, package managers, data layers, and common build/test commands.

### Security and secrets

The Actor is designed for repository analysis without executing untrusted code.

- repository code is never executed
- `.env`, credential files, private keys, and similar secret-like files are not fetched
- `.env.example` and other safe templates can be read for structural context
- the GitHub token is configured as a secret Actor input
- generated prompts warn coding agents to treat issue text and linked external content as untrusted task data

For private repositories, output naturally contains information derived from repositories the supplied token can access. Protect the resulting dataset and key-value store according to your own access requirements.

### GitHub token

A token is optional for very small public scans but strongly recommended for production workloads because unauthenticated GitHub API limits are low.

Use the least-privileged token that can read the repositories you want to analyze. The Actor only performs read requests.

### Inputs

Important inputs include:

| Input | Purpose | Default |
|---|---|---|
| `mode` | Safe demo or live GitHub scan | `demo` |
| `repositories` | Explicit GitHub repositories | empty |
| `organizations` | GitHub organizations to expand | empty |
| `sourceDatasetId` | Optional Apify dataset containing repositories | empty |
| `githubToken` | GitHub API token | empty |
| `issueState` | Open, closed, or all issues | `open` |
| `updatedSinceDays` | Only issues updated within this window; `0` disables | `365` |
| `minTaskScore` | Minimum coding-task confidence | `55` |
| `maxRepositories` | Maximum repositories | `100` |
| `maxIssuesPerRepository` | Maximum issues scanned per repository | `500` |
| `maxTasks` | Maximum accepted output tasks | `5000` |
| `relevantFilesPerTask` | Likely files retained per task | `8` |
| `generateAgentPrompt` | Generate a coding-agent prompt | `true` |

The Apify input UI exposes additional filters for labels, assignment state, forks, archived repositories, concurrency, and context depth.

### Output

One accepted task equals one default-dataset item.

Example:

```json
{
  "type": "coding_task",
  "taskId": "example/acme-dashboard#142",
  "repository": "example/acme-dashboard",
  "issueNumber": 142,
  "issueTitle": "Fix user table crash when email is missing",
  "taskType": "bugfix",
  "taskScore": 79,
  "complexity": "medium",
  "language": "TypeScript",
  "frameworks": ["Next.js", "React"],
  "filesLikelyAffected": [
    "src/components/UserTable.tsx",
    "src/components/UserTable.test.tsx"
  ],
  "testCommand": "pnpm test",
  "buildCommand": "pnpm build",
  "agentPrompt": "You are working in the GitHub repository ..."
}
```

The run key-value store also contains `SUMMARY`, including repository counts, scanned issues, filtered issues, accepted tasks, API request count, and repository/input errors.

If **Save repository contexts** is enabled, compact `REPO_CONTEXT_*.json` files are stored there as well.

### Large runs

For large organization scans:

- provide a GitHub token
- keep repository concurrency conservative
- narrow `Updated within days` when you only need recent work
- use label filters when your repositories have consistent issue taxonomy
- lower `Repository context files` if API budget matters more than enrichment depth
- set `maxTasks` to control output size

The Actor paginates GitHub issues and organization repositories automatically and retries temporary API/rate-limit responses.

### Notes for benchmark datasets

When scanning closed issues, the Actor intentionally does not fetch issue comments or merged pull-request patches. This reduces accidental solution leakage into the generated task prompt.

`commitSha` represents the repository snapshot analyzed at scan time. It is **not** claimed to be the historical commit that existed when an older issue was opened.

### Output consistency

Task rows are structured for downstream automation and can be consumed directly from the default dataset as JSON, CSV, or through the Apify API.

# Changelog

This Actor's version history is a separate document: https://apify.com/coolinbex/ai-coding-task-dataset-builder/changelog.md

# Actor input Schema

## `mode` (type: `string`):

Use the safe built-in demo or scan live GitHub repositories and organizations.

## `repositories` (type: `array`):

Repositories as owner/repo or github.com URLs. You can combine these with organizations and a source dataset.

## `organizations` (type: `array`):

Organization logins or github.com organization URLs. Repositories are expanded automatically.

## `sourceDatasetId` (type: `string`):

Optional Apify dataset containing GitHub repository strings.

## `datasetRepositoryField` (type: `string`):

Field containing owner/repo or a GitHub repository URL in each source dataset item.

## `githubToken` (type: `string`):

Optional for small public scans, strongly recommended for large batches, and required for private repositories. Read-only repository access is sufficient.

## `issueState` (type: `string`):

Open issues are best for current agent work. Closed/all issues are useful for benchmark and historical datasets.

## `updatedSinceDays` (type: `integer`):

Only scan issues updated within this many days. Set 0 to disable the time filter.

## `includeLabels` (type: `array`):

Optional label allow-list. If set, an issue must have at least one listed label.

## `excludeLabels` (type: `array`):

Issues with any of these labels are skipped before scoring.

## `assignmentFilter` (type: `string`):

Keep all issues, only assigned issues, or only unassigned issues.

## `minTaskScore` (type: `integer`):

0-100 heuristic confidence that an issue is an actionable coding task. 55 is a balanced default.

## `maxRepositories` (type: `integer`):

Maximum unique repositories expanded and processed in one run.

## `maxIssuesPerRepository` (type: `integer`):

Maximum non-pull-request issues scanned per repository, ordered by most recently updated.

## `maxTasks` (type: `integer`):

Stop emitting new task rows after this many accepted coding tasks.

## `includeForks` (type: `boolean`):

Include repositories marked as forks.

## `includeArchived` (type: `boolean`):

Include archived repositories.

## `maxContextFiles` (type: `integer`):

Maximum high-value manifests/config/instruction files fetched per repository for stack and command detection.

## `maxContextFileBytes` (type: `integer`):

Selected context files larger than this are skipped. Secret-like files are never fetched.

## `relevantFilesPerTask` (type: `integer`):

Maximum likely-relevant repository paths attached to each coding task.

## `maxIssueBodyChars` (type: `integer`):

Maximum issue-body characters stored in each task and generated prompt.

## `generateAgentPrompt` (type: `boolean`):

Generate a ready-to-use task prompt for Codex, Cursor, Claude Code, and other coding agents.

## `saveRepositoryContexts` (type: `boolean`):

Save compact per-repository context JSON files in the run key-value store.

## `repositoryConcurrency` (type: `integer`):

Repositories processed in parallel. Keep conservative to reduce GitHub secondary-rate-limit risk.

## `fileConcurrency` (type: `integer`):

Selected repository blobs fetched in parallel inside each repository.

## `failOnRepositoryError` (type: `boolean`):

Useful for CI. Successful task rows and summary are saved first, then the run fails if any repository failed.

## Actor input object example

```json
{
  "mode": "demo",
  "repositories": [],
  "organizations": [],
  "datasetRepositoryField": "repository",
  "issueState": "open",
  "updatedSinceDays": 365,
  "includeLabels": [],
  "excludeLabels": [
    "duplicate",
    "invalid",
    "wontfix",
    "won't fix",
    "question",
    "support",
    "discussion",
    "not planned"
  ],
  "assignmentFilter": "any",
  "minTaskScore": 55,
  "maxRepositories": 100,
  "maxIssuesPerRepository": 500,
  "maxTasks": 5000,
  "includeForks": false,
  "includeArchived": false,
  "maxContextFiles": 16,
  "maxContextFileBytes": 250000,
  "relevantFilesPerTask": 8,
  "maxIssueBodyChars": 6000,
  "generateAgentPrompt": true,
  "saveRepositoryContexts": false,
  "repositoryConcurrency": 2,
  "fileConcurrency": 5,
  "failOnRepositoryError": false
}
```

# Actor output Schema

## `tasks` (type: `string`):

Accepted GitHub issues enriched as coding-agent tasks.

## `summary` (type: `string`):

Repository, issue, filtering, task, and API request counts.

## `errors` (type: `string`):

Repository and input errors, when any occurred.

## `artifacts` (type: `string`):

Optional REPO\_CONTEXT\_\*.json files when Save repository contexts is enabled.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("coolinbex/ai-coding-task-dataset-builder").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("coolinbex/ai-coding-task-dataset-builder").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call coolinbex/ai-coding-task-dataset-builder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,coolinbex/ai-coding-task-dataset-builder"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/XMm7utmK6RFXXMlE1/builds/AQjNERYcqzxeUvCz5/openapi.json
