60s
CLAUDE.md5.9k starsChanged 15 months agoMITView on GitHub
60s API is a comprehensive API collection providing news, trending topics, and utility services. Built with Deno and Oak framework, it supports multiple runtime environments (Deno, Node.js, Bun) and deployment platforms (Docker, Cloudflare Workers). Each API endpoint follows a consistent module pattern: Example structure: IMPORTANT: Unless specifically noted otherwise, ALL APIs MUST support these three encoding formats: Special formats (only when explicitly needed): - image - redirect to image URL - image-proxy - proxied image content - html - HTML…
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 109
Default timezone: Always use TZ_SHANGHAI (Asia/Shanghai) for all time operations unless explicitly specified otherwise.
- Very specific: line 161
Type Safety: Use TypeScript types, avoid any when possible
- Distinctive: line 162
Error Handling: Always handle fetch errors and invalid responses
- Very specific: line 164
Consistency: Follow existing code patterns in src/modules/
- Distinctive: line 165
Documentation: Add JSDoc comments for complex functions
- Very specific: line 166
Testing: Test all three encoding formats (json/text/markdown) when adding new APIs
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
60s API is a comprehensive API collection providing news, trending topics, and utility services. Built with Deno and Oak framework, it supports multiple runtime environments (Deno, Node.js, Bun) and deployment platforms (Docker, Cloudflare Workers).
Development Commands
Running the application
# Development mode (port 4398)
pnpm run dev
# Production mode (port 4398)
pnpm run start
# Docker
pnpm run docker:build
pnpm run docker:runCommon operations
# Update all lockfiles
pnpm run update-lockfile
# Release new version (bumps version and creates git tag)
pnpm run releaseArchitecture
Core Structure
- Entry points:
deno.ts,node.ts,bun.ts,cf-worker.tsfor different runtimes - Main app:
src/app.ts- Oak application with middleware setup - Routing:
src/router.ts- centralized route definitions with/v2prefix - Modules:
src/modules/- individual API service implementations - Middlewares:
src/middlewares/- cross-cutting concerns (CORS, error handling, encoding)
Key Components
- Common utilities:
src/common.ts- shared functions for JSON building, parameter extraction, date formatting - Configuration:
src/config.ts- environment-based settings - Encoding middleware: Handles
encodingquery parameter for response format transformation
Development Guidelines
Module Development Pattern
Each API endpoint follows a consistent module pattern:
- Create service class in
src/modules/[name].module.ts - Implement
handle()method returning Oak RouterMiddleware - Handle different encoding formats in the middleware (see Response Formats below)
- Register route in
src/router.ts - Import and add to router configuration
Example structure:
export class MyModule {
async handle(): RouterMiddleware<any> {
return async (ctx) => {
const encoding = ctx.state.encoding
const data = await this.fetchData()
if (encoding === 'text') {
ctx.response.body = this.formatAsText(data)
} else if (encoding === 'markdown') {
ctx.response.body = this.formatAsMarkdown(data)
} else {
ctx.response.body = Common.buildJson(data)
}
}
}
}Response Format Standards
IMPORTANT: Unless specifically noted otherwise, ALL APIs MUST support these three encoding formats:
json(default) - structured JSON response viaCommon.buildJson()text- plain text format for terminal/script usagemarkdown- markdown formatted text for documentation/display
Special formats (only when explicitly needed):
image- redirect to image URLimage-proxy- proxied image contenthtml- HTML encoded output
Time Handling Standards
ALWAYS use dayjs for time operations:
import { dayjs, TZ_SHANGHAI } from './common.ts'
// Get current time in Shanghai timezone
const now = dayjs().tz(TZ_SHANGHAI)
// Format date
const dateStr = now.format('YYYY-MM-DD')
// Parse and convert timezone
const parsedDate = dayjs(timestamp).tz(TZ_SHANGHAI)Default timezone: Always use TZ_SHANGHAI (Asia/Shanghai) for all time operations unless explicitly specified otherwise.
Common Patterns
Response Building:
// Success response
ctx.response.body = Common.buildJson(data)
// Error response with custom message
ctx.response.status = 400
ctx.response.body = Common.buildJson(null, 400, 'Custom error message')
// Require arguments
if (!param) {
Common.requireArguments('paramName', ctx.response)
return
}Parameter Handling:
// Query parameters
const param = ctx.request.url.searchParams.get('param')
// Support both query and POST body (for large params)
const largeParam = await Common.getParam('param', ctx.request, true)Web Scraping:
// Always use Common.chromeUA for User-Agent
const response = await fetch(url, {
headers: { 'User-Agent': Common.chromeUA }
})Caching:
// Implement caching for expensive operations
const cache = new Map<string, { data: any; timestamp: number }>()
const CACHE_TTL = 30 * 60 * 1000 // 30 minutes
// Check cache before fetching
const cached = cache.get(key)
if (cached && Date.now() - cached.timestamp < CACHE_TTL) {
return cached.data
}Code Quality Standards
- Type Safety: Use TypeScript types, avoid
anywhen possible - Error Handling: Always handle fetch errors and invalid responses
- Validation: Validate required parameters using
Common.requireArguments() - Consistency: Follow existing code patterns in
src/modules/ - Documentation: Add JSDoc comments for complex functions
- Testing: Test all three encoding formats (json/text/markdown) when adding new APIs
Useful Utilities
From src/common.ts:
Common.buildJson()- Standard JSON response builderCommon.requireArguments()- Parameter validationdayjs/TZ_SHANGHAI- Time operations (prefer overCommon.localeDate()/Common.localeTime())Common.randomInt()/Common.randomItem()- Random utilitiesCommon.md5()- MD5 hashingCommon.qs()- Query string builderCommon.tryRepoUrl()- GitHub CDN fallback fetcher
Note: Common.localeDate() and Common.localeTime() are legacy utilities. For new code, always use dayjs with TZ_SHANGHAI timezone as shown in the Time Handling Standards section.
Trending
Quiet since June.thin dataabout the whole repository
Who's talking about vikiboss/60s
- ruanyf/weekly“【开源自荐】⏰ 60s API,一系列 高质量、开源、可靠、全球 CDN 加速 的开放 API 集合”GitHub · Sep 10, 2025 · 1 reactions
- zhoufan47/astrbot_plugin_bbt_daily_news“希望可以加入金价油价之类的分区”GitHub · Jun 29, 2026
- 1Password/for-open-source“Application for 60s API”GitHub · Apr 28, 2026
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

