Code Repository Questions

Last updated: November 25, 2026

Code Repository lets you create multiple questions from a single repository. Each question can assess a different objective, such as fixing a bug, building a feature, or working on a specific part of the application, while reusing the same base setup. 

The AI agent helps throughout the setup flow by analyzing the uploaded repository, summarizing its structure, suggesting setup details, and assisting with question creation.

Key benefits

Code repository questions offer the following benefits:

  • Reuse a single repository: Create multiple questions from the same Code Repository without rebuilding the setup for each question.

  • Assess multiple skills: Use the same repository to evaluate different skill sets, such as front-end, back-end, or full-stack development.

  • Use AI-assisted setup and creation: Let the AI Assistant analyze the repository, summarize content, suggest setup commands, and generate tasks.

Code Repository artifacts

A Code Repository artifact is the shared base used across multiple questions.

The following elements remain the same across questions:

  • Base repository

  • Installation setup

  • Run commands

The following elements can change for each question:

  • Problem statement

  • Question objective

  • Test cases

  • File or repository changes

  • Interviewer guidelines

Creating a Code Repository question

To create a Code Repository question:

  1. Log in to your HackerRank for Work account using your credentials.

  2. Go to the Library tab.

  3. Click Create Question.

    image.png
  4. Select Code Repository under Projects.

    image.png
  5. Select the project environment.

    image.png
  1. Upload a ZIP file of your repository to set up your project environment.

    image.png

    Note:

    • The ZIP file size must not exceed 5 MB.

    • The platform automatically removes the .git folder if it exists in your ZIP file.

  2. Wait for the AI Assistant to analyze the repository and generate a summary.

  3. Review the AI-generated summary of the repository.

    1. (Optional) Update or refine the summary if needed.

  4. Confirm the AI Assistant’s understanding to proceed with question creation.

  5. In the hackerrank.yml file:

    1. Review the generated install, run, and test commands. If the repository includes a README file, the platform may extract commands from it.

      image.png
    2. (Optional) Update the ide_config install or run if needed.

      The ADE categorizes application ports as frontend or backend. When a frontend port becomes active, the preview opens automatically. Backend ports do not open a preview automatically, which prevents unnecessary previews for backend questions.

      Make sure your question’s run script serves the web UI on a frontend port, such as port 3000. If the UI runs on a port treated as backend, such as port 8000, the preview does not open automatically.

      Note: Use the ports_settings field in hackerrank.yml to add custom port labels that help users identify the services. The following screenshot shows port 3000 labeled Frontend and port 5000 labeled Backend.

      image.png
  6. In the AI Assistant panel, choose the type of task you want to create:

    image.png
    • Feature Building

    • Bug Fixing

  7. Click Submit.
    The AI Assistant suggests tasks based on the repository.

    image.png
  8. Choose one of the following:

    • Select a suggested task.

    • Select Other and describe your own task.

  9. Click Submit.

    The AI Assistant may ask follow-up questions. Enter the requested details to proceed.
    After confirmation, the AI Assistant generates:

  • Problem statement

  • Required file or repository changes

  • Interviewer guidelines

  1. Review the generated content.

    1. (Optional) Edit any section if needed.

  2. Review the newly generated coderepo_tasks section in the hackerrank.yml file.

    Sample:

    coderepo_tasks:
        - name: Task Name
          task_type: feature
          test_command: npm test
          scoring_command: npm install && npm test
          test_report_path: unit.xml
          test_suite_path: test/test2.js
  1. Click Publish.

    image.png
  2. Wait for validation to complete.
    After successful validation, the platform saves the question.

    image.png

You can click View in Library to open the question or click Create another task to add another question from the same repository.

Note: Click the settings icon in the upper-right corner of the repository to update the repository name and description.

Adding questions to an existing Code Repository

To add a question to an existing code repository:

  1. Go to the Library tab.

  2. Open a question created from the repository.

  3. Click Create another task.

    image.png
  4. Follow the steps in Creating a Code Repository question to create a new task.

Editing an existing Code Repository question

To edit an existing Code Repository question:

  1. Go to the Library tab.

  2. Locate the question you want to update.

  3. Click Edit.

    image.png
  4. Update the required sections in the Code Repository interface.

  5. Click Publish to validate and save your changes.

Frequently Asked Questions

Why does validation take time?

Validation takes time because the platform checks not only the current question but also the impact of changes on other questions that use the same repository.

What remains the same across questions from the same repository?

The following elements remain the same:

  • Repository files

  • Installation setup

  • Run commands

What changes across questions from the same repository?

The following elements vary for each question:

  • Problem statement

  • Question objective

  • Test cases

  • File or repository changes

  • Interviewer guidelines

How does the AI Assistant help during question creation?

The AI Assistant supports the workflow by:

  • Analyzing the uploaded repository

  • Summarizing repository content

  • Helping refine the repository understanding

  • Suggesting install and run commands

  • Generating and refining tasks based on the codebase

How many questions should I create from one repository?

HackerRank recommends you create fewer than 10 questions from a single repository. This limit keeps the repository manageable and reduces validation complexity.

Does the AI Assistant support validation?

No. The AI Assistant does not support the validation flow. It helps with understanding the repository, suggesting setup details, and assisting with question creation.

Can I add images or GIFs to the question description?

No. The question description supports text only.

How can I navigate between tasks within the question creation interface?

Click the dropdown next to the code repository name.

image.png