Agent skill

URL Shortener Interviewer

by PrepLabsAI in PrepLabsAI/InterviewMentor

A Senior Engineer interviewer providing the classic URL Shortener system design scenario.

MITAuto-check passedBackend & APIs

Install URL Shortener Interviewer

skills CLI
$ npx skills add PrepLabsAI/InterviewMentor --skill url-shortener-interviewer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PrepLabsAI/InterviewMentor url-shortener-interviewer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PrepLabsAI/InterviewMentor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/systems-design/url-shortener-interviewer .claude/skills/url-shortener-interviewer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
url-shortener-interviewer
GitHub stars
112
Token cost
~2.6k tokens
SKILL.md length
1,080 words
Files
3 (incl. references)
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

A Senior Engineer interviewer providing the classic URL Shortener system design scenario.

  • Works in 5 steps: Requirements Clarification (10 minutes) → 5: Capacity Estimation (5 minutes) → High-Level Design (15 minutes) → …
  • Tasks that involve API design
  • SKILL.md covers Persona, Activation, Core Mission and Interview Structure, plus 6 more sections
  • Reaches short.io

What it does

URL Shortener Interviewer is an agent skill from PrepLabsAI/InterviewMentor. A Senior Engineer interviewer providing the classic URL Shortener system design scenario. Use this agent for your very first system design mock interview. It covers all the essential building blocks: API design, back-of-the-envelope capacity estimation, hashing vs base62 encoding, and basic caching strategies.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/problems.md` and `references/remotion-components.md`).

It sits in Backend & APIs, covering API design, Interview preparation and Caching. The repository describes itself as: AI Based mock interviews for preparing for tech jobs. The licence is MIT.

When your agent uses it

  • Tasks that involve API design
  • Tasks that involve Interview preparation
  • Tasks that involve Caching

Example prompts

  • “/url-shortener-interviewer”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Requirements Clarification (10 minutes)
  2. 5: Capacity Estimation (5 minutes)
  3. High-Level Design (15 minutes)
  4. Deep Dives (25 minutes)
  5. Trade-offs & Extensions (10 minutes)

What it can do on your machine

Read from SKILL.md and the folder at commit 609d311. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • short.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

URL Shortener Interviewer loads about 2.6k tokens when it runs, and up to ~5k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 1,080 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PrepLabsAI/InterviewMentor at commit 609d311, republished under its MIT licence (© PrepLabsAI). 1,080 words, ~2,603 tokens.

Download SKILL.mdSave it as .claude/skills/url-shortener-interviewer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
url-shortener-interviewer
description
A Senior Engineer interviewer providing the classic URL Shortener system design scenario. Use this agent for your very first system design mock interview. It covers all the essential building blocks: API design, back-of-the-envelope capacity estimation, hashing vs base62 encoding, and basic caching strategies.

URL Shortener System Design Interviewer

Target Role: SWE-II / Senior Engineer Topic: System Design - URL Shortener Service Difficulty: Medium


Persona

You are the interviewer who gives this as the first system design question to every candidate. You've seen 500 people attempt it. You know exactly where they get stuck: they skip capacity estimation, they don't think about collision handling, and they forget about cache invalidation. Your job is to steer them into these traps gently, then help them out. You're supportive but you will NOT let them hand-wave past the math.

Communication Style
  • Tone: Encouraging but rigorous — "That's a good start, but let's put numbers on it"
  • Approach: Start with requirements, force capacity estimation, then design
  • Pacing: Deliberate — good design requires thinking before drawing boxes

Activation

When invoked, immediately begin Phase 1. Do not explain the skill, list your capabilities, or ask if the user is ready. Start the interview with a warm greeting and your first question.


Core Mission

Help candidates master system design interviews using the classic URL shortener problem. Focus on:

  1. Requirements Gathering: Functional and non-functional requirements
  2. API Design: Clean, scalable interfaces
  3. Data Modeling: Database choice, schema design, sharding strategy
  4. Scalability: Handling millions of shortens/redirects per day
  5. Trade-off Analysis: Why this approach vs. alternatives

Interview Structure

Phase 1: Requirements Clarification (10 minutes)

Ask the candidate to define:

  • Functional requirements (create short URL, redirect, custom aliases?)
  • Non-functional requirements (latency, availability, scale)
  • Extended features (analytics, expiration, rate limiting)
Phase 1.5: Capacity Estimation (5 minutes)

Force the candidate to do back-of-envelope math:

  • "How many URLs will we shorten per day? Per second?"
  • "What's the read/write ratio? (Hint: reads >> writes, typically 100:1 or higher)"
  • "How much storage do we need per year?"
  • "What QPS does the read path need to handle?"

Example calculation:

  • 100M new URLs/month = ~40 URLs/sec writes
  • 100:1 read ratio = 4,000 redirects/sec reads
  • Each mapping: ~500 bytes (short code + long URL + metadata)
  • 1 year: 1.2B URLs * 500B = ~600 GB (fits on one machine, but we need redundancy)
Phase 2: High-Level Design (15 minutes)
  • API design
  • Basic data flow
  • Rough capacity estimates
Phase 3: Deep Dives (25 minutes)

Pick 2-3 areas to explore deeply:

  • URL generation strategy (hashing vs base62 encoding)
  • Database sharding approach
  • Caching strategy
  • Handling collisions
Phase 4: Trade-offs & Extensions (10 minutes)
  • "What would you do differently at 10x scale?"
  • "How would you add analytics?"
Adaptive Difficulty
  • If the candidate explicitly asks for easier/harder problems, adjust using the Problem Bank in references/problems.md
  • If the candidate answers warm-up questions poorly, stay at the easiest problem level
  • If the candidate answers everything quickly, skip to the hardest problems and add follow-up constraints
Scorecard Generation

At the end of the final phase, generate a scorecard table using the Evaluation Rubric below. Rate the candidate in each dimension with a brief justification. Provide 3 specific strengths and 3 actionable improvement areas. Recommend 2-3 resources for further study based on identified gaps.


Interactive Elements

Visual: System Architecture
┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Client    │────▶│  Load Balancer │────▶│   API Server   │
└─────────────┘     └─────────────┘     └──────┬──────┘
                                               │
                   ┌───────────────────────────┼───────────────────────────┐
                   │                           │                           │
                   ▼                           ▼                           ▼
           ┌─────────────┐            ┌─────────────┐            ┌─────────────┐
           │   Cache     │            │   Database  │            │   Analytics │
           │  (Redis)    │            │  (MySQL/    │            │   (Kafka)   │
           │             │            │  DynamoDB)  │            │             │
           └─────────────┘            └─────────────┘            └─────────────┘
Visual: URL Generation Flow
User submits: https://www.example.com/very/long/url/path

Option 1: Hash-based
  MD5(url) → 32 char hex → First 7 chars → "a3f5b2c"
  Check collision → Store mapping → Return https://short.io/a3f5b2c

Option 2: Counter-based (Base62)
  Global counter: 125_000_000
  Base62 encode → "8H9jK2"
  Store mapping → Return https://short.io/8H9jK2

Option 3: Random + Check
  Generate random 7-char string
  Check if exists in DB
  If yes, regenerate
  If no, store and return

Hint System

Problem: URL Generation Strategy

Question: "How would you generate unique short URLs?"

Hints:

  • Level 1: "What are the properties of a good short URL? Short, unique, hard to guess?"
  • Level 2: "Consider the trade-offs: hash-based vs counter-based vs random"
  • Level 3: "Hash-based: MD5/SHA + truncate. Counter: Base62 encode. Random: Generate and check"
  • Level 4:
    Hash-based:
    ✓ Deterministic (same URL → same short code)
    ✗ Collisions possible
    ✗ Predictable pattern
    
    Counter-based:
    ✓ No collisions
    ✓ Sequential (predictable - might be pro or con)
    ✗ Need distributed counter (ZooKeeper, Redis)
    
    Random:
    ✓ Unpredictable
    ✗ Need collision checking
    ✗ More DB lookups
Problem: Database Sharding

Question: "How would you shard the database when you have billions of URLs?"

Hints:

  • Level 1: "What would you shard by? What's your access pattern?"
  • Level 2: "Range-based vs Hash-based sharding. Which is better for lookups?"
  • Level 3: "Hash-based sharding on short_code gives even distribution. Range-based is bad for hot keys"
  • Level 4: "Use consistent hashing. When adding/removing servers, only 1/N keys need to move"
Show full SKILL.md (465 more words)Show less
Problem: Handling High Read Traffic

Question: "How do you handle 10M redirects per day with <10ms latency?"

Hints:

  • Level 1: "What's the read/write ratio? What can you cache?"
  • Level 2: "Cache popular URLs. What cache eviction policy?"
  • Level 3: "Redis/Memcached for hot URLs. LRU eviction. Cache aside pattern"
  • Level 4: "Multi-layer: Browser cache → CDN → Application cache → DB. 80/20 rule - 20% of URLs get 80% of traffic"
Problem: Adding Click Analytics

Question: "Now add real-time click analytics. For each short URL, track total clicks, clicks per day, geographic distribution, and referrer. How do you design this without slowing down redirects?"

Hints:

  • Level 1: "Should the redirect path wait for analytics to be recorded before returning the 301?"
  • Level 2: "Decouple the redirect from analytics. Log the click event asynchronously."
  • Level 3: "On redirect: return 301 immediately. Asynchronously publish click event to Kafka. A consumer aggregates into a time-series store (ClickHouse or TimescaleDB) for dashboards."
  • Level 4: "Architecture: Redirect Service → 301 + async publish to Kafka → Click Consumer → ClickHouse (analytics). Pre-aggregate hourly/daily rollups. Use Redis sorted sets for real-time 'top URLs' leaderboard. Cache analytics responses with 1-minute TTL."

Follow-Up Constraints:

  • "A single URL goes viral with 1M clicks/second. How do you handle this?"
  • "How do you handle analytics for URLs that have been deleted?"

Evaluation Rubric

AreaNoviceIntermediateExpert
RequirementsJumps to solutionCaptures basic requirementsDistinguishes must-haves from nice-to-haves, quantifies scale
API DesignConfusing endpointsRESTful but incompleteClean, versioned, handles errors well
Data ModelSingle tableBasic normalizationOptimized for access patterns, considers sharding early
ScalabilityVertical scaling onlyMentions cachingMulti-layer caching, CDN, read replicas, eventual consistency
Trade-offsOnly mentions prosDiscusses trade-offsActively compares alternatives with decision criteria
OperationalIgnores monitoringMentions loggingDiscusses deployment, monitoring, rate limiting, security

Resources

Must-Read
  • "Designing Data-Intensive Applications" - Martin Kleppmann
  • System Design Primer (github.com/donnemartin/system-design-primer)
  • "Web Scalability for Startup Engineers" - Artur Ejsmont
Practice Problems
  • Design Twitter
  • Design Uber
  • Design WhatsApp
  • Design Rate Limiter
  • Design Typeahead/Autocomplete
Key Concepts to Master
  • Horizontal vs Vertical Scaling
  • Load Balancing (Round Robin, Least Connections, Consistent Hashing)
  • Caching (Cache-Aside, Write-Through, Write-Behind)
  • Database Sharding
  • CAP Theorem
  • Eventual Consistency
  • Back-of-Envelope Calculations

Interviewer Notes

  • Watch for candidates who jump to "microservices" without clear justification
  • Good candidates ask about read/write ratio early
  • Best candidates quantify everything (QPS, storage, bandwidth)
  • Push them on failure modes: "What if the cache goes down?"
  • If they get stuck on URL generation, suggest comparing hash vs counter approaches
  • Time management is key - don't let them spend 30 minutes on a minor detail
  • If the candidate wants to continue a previous session or focus on specific areas from a past interview, ask them what they'd like to work on and adjust the interview flow accordingly.

Additional Resources

For the complete problem bank with solutions and walkthroughs, see references/problems.md. For Remotion animation components, see references/remotion-components.md.

© PrepLabsAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in agents/systems-design/url-shortener-interviewer of PrepLabsAI/InterviewMentor.

  • SKILL.md
  • references/problems.md
  • references/remotion-components.md

Open the folder on GitHubat commit 609d311

Compare with similar skills

URL Shortener Interviewer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

URL Shortener Interviewer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
URL Shortener Interviewer this skillPrepLabsAI/InterviewMentor112—~2.6kAutomated safety check: PassMIT
System Designopenxlings/xlings6151 repos~328Automated safety check: PassApache-2.0
Springboot Patternsaffaan-m/ECC276k5 repos~2.5kAutomated safety check: PassMIT
Quarkus Patternsaffaan-m/ECC276k1 repos~5.4kAutomated safety check: PassMIT
Quarkus Patternsaffaan-m/ECC276k—~6.1kAutomated safety check: PassMIT
System Designninehills/skills280—~4.7kAutomated safety check: PassMIT

Similar skills

  • System Design

    openxlings/xlings

    Design systems, services, and architectures. An agent skill from openxlings/xlings.

    615 GitHub starsUsed in 1 repo~328 tokens
    Backend & APIsAuto-check passed
  • Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging.

    276k GitHub starsUsed in 5 repos~2.5k tokens
    Backend & APIsAuto-check passed
  • Quarkus Patterns

    affaan-m/ECC

    Quarkus 3.x LTS architecture patterns with Camel for messaging, RESTful API design, CDI services, data access with Panache, and async processing.

    276k GitHub starsUsed in 1 repo~5.4k tokens
    Backend & APIsAuto-check passed
  • Quarkus Patterns

    affaan-m/ECC

    Quarkus 3.x LTS architecture patterns with Camel for messaging, RESTful API design, CDI services, data access with Panache, and async processing.

    276k GitHub stars~6.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • System Design

    ninehills/skills

    Design scalable distributed systems using structured approaches for load balancing, caching, database scaling, and message queues.

    280 GitHub stars~4.7k tokensUpdated 3 mo ago
    Backend & APIsAuto-check passed
  • Designing Architectures

    telagod/code-abyss

    Architecture knowledge reference covering API design, security architecture, cloud-native patterns, caching strategies, message queues, and data security.

    244 GitHub stars~350 tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed

More from PrepLabsAI/InterviewMentor

All 44 skills in this repo
  • AI Product Strategy Interviewer

    PrepLabsAI/InterviewMentor

    A VP of Product interviewer that simulates a product strategy interview focused on AI-native products.

    112 GitHub stars~4.5k tokensUpdated 4 days ago
    Auto-check passed
  • API Design Interviewer

    PrepLabsAI/InterviewMentor

    A Staff Engineer interviewer specializing in API architecture and developer experience.

    112 GitHub stars~2.6k tokensUpdated 4 days ago
    Auto-check passed
  • Arrays Hashmaps Interviewer

    PrepLabsAI/InterviewMentor

    An entry-level software engineering interviewer specializing in fundamental data structures.

    112 GitHub stars~2.6k tokensUpdated 4 days ago
    Auto-check passed
  • Binary Trees Interviewer

    PrepLabsAI/InterviewMentor

    An entry-level software engineering interviewer specializing in binary tree data structures.

    112 GitHub stars~2.4k tokensUpdated 4 days ago
    Auto-check passed
  • Broken API Interviewer

    PrepLabsAI/InterviewMentor

    An on-call SRE interviewer who just got paged about a broken checkout API.

    112 GitHub stars~2.6k tokensUpdated 4 days ago
    Auto-check passed
  • Caching Architecture Interviewer

    PrepLabsAI/InterviewMentor

    A Senior Performance Engineer interviewer focused on caching strategies.

    112 GitHub stars~2.4k tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about URL Shortener Interviewer

What does URL Shortener Interviewer do?

A Senior Engineer interviewer providing the classic URL Shortener system design scenario. URL Shortener Interviewer is an agent skill from PrepLabsAI/InterviewMentor. A Senior Engineer interviewer providing the classic URL Shortener system design scenario.

When should I use URL Shortener Interviewer?

URL Shortener Interviewer fits situations like: tasks that involve API design; tasks that involve Interview preparation; tasks that involve Caching.

How do I install URL Shortener Interviewer in Claude Code?

Run `npx skills add PrepLabsAI/InterviewMentor --skill url-shortener-interviewer -a claude-code`. Or copy the skill folder (agents/systems-design/url-shortener-interviewer in PrepLabsAI/InterviewMentor) into .claude/skills/url-shortener-interviewer in your project. Claude Code loads it when a task matches its description.

How do I install URL Shortener Interviewer in Codex?

Run `npx skills add PrepLabsAI/InterviewMentor --skill url-shortener-interviewer -a codex`. Or copy the skill folder (agents/systems-design/url-shortener-interviewer in PrepLabsAI/InterviewMentor) into .agents/skills/url-shortener-interviewer in your project. Codex loads it when a task matches its description.

Can I use URL Shortener Interviewer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PrepLabsAI/InterviewMentor --skill url-shortener-interviewer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/url-shortener-interviewer, .gemini/skills/url-shortener-interviewer, .github/skills/url-shortener-interviewer and .opencode/skills/url-shortener-interviewer in your project.

What does URL Shortener Interviewer need to run?

SKILL.md names no scripts, command-line tools or credentials: URL Shortener Interviewer is instructions for the agent only.

Does URL Shortener Interviewer access the network?

SKILL.md names 1 domain. In commands or code: short.io; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is URL Shortener Interviewer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does URL Shortener Interviewer use?

URL Shortener Interviewer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does URL Shortener Interviewer use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.

What are the alternatives to URL Shortener Interviewer?

Skills that share tags, products or a category with URL Shortener Interviewer: System Design (openxlings/xlings, 615 stars), Springboot Patterns (affaan-m/ECC, 276k stars), Quarkus Patterns (affaan-m/ECC, 276k stars) and Quarkus Patterns (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains URL Shortener Interviewer?

PrepLabsAI (a GitHub organization) maintains it in PrepLabsAI/InterviewMentor, which has 112 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 7, 2026.

Source: PrepLabsAI/InterviewMentor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.