public-holidays
Look up public holidays for any country and year with zero API keys — the Nager.Date API via curl, with long-weekend detection and cross-country pla…
它会碰到什么
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
Public Holidays Skill
"Is Monday a holiday in Germany?" is a five-second question that decides deploy schedules, invoice due dates, and vacation math — and Nager.Date answers it for 100+ countries over keyless HTTPS. This skill fetches, answers the actual question (a date, a plan, a long weekend), and respects the two traps: regional holidays that don't apply nationwide, and the countries whose holiday culture the API's global flag quietly encodes.
What This Skill Produces
- The answer — is/isn't a holiday, the next one coming, or the year's list — whichever was asked
- Local names alongside English — 元日 reads differently than "New Year's Day," and the local name is what colleagues will say
- Long-weekend candidates — holidays adjacent to weekends, the planning gold
- The command — exact curl, rerunnable
Required Inputs
Ask for these if not provided:
- Country (or countries) — ISO two-letter codes resolved from names; multi-country questions are batched, one call each
- Year — default the current year; "next 12 months" spans two calls
- The real question — a specific date, planning a trip, scheduling around a team, or hunting long weekends — the output shapes to it
Framework: The Calls and the Traps
- The year list:
curl -s "https://date.nager.at/api/v3/PublicHolidays/2026/JP"→ JSON array withdate,localName,name,global,counties,types. Next holidays:.../api/v3/NextPublicHolidays/DE. Specific-date check: fetch the year, match the date. Long weekends, precomputed:.../api/v3/LongWeekend/2026/DE— the API does the adjacency math itself. - The
globalflag is the regional trap:global: false+ acountiesarray means the holiday applies only in listed regions (Bavaria's extra days, Scotland vs England). Answering "Germany has a holiday" for a Bavaria-only day is the classic wrong answer — quote the regions. typesmatters at the edges: most entries arePublic, but some countries includeBank,School,Optional,Observance— an Observance is not a day off; filter or label by type when the question is "is the office closed."- Cross-country scheduling: fetch each country, then intersect/union per the question ("when are BOTH teams off" vs "when is ANYONE off"); present as a small table with local names.
- Coverage honesty: ~110 countries; religious holidays following lunar calendars are included where official but company/regional observances (Diwali bonus days, US company holidays like day-after-Thanksgiving) may not be — say when a workplace calendar could differ from the public list.
Output Format
Holidays: [country/countries, year]
[The direct answer to the actual question first.]
| Date | Holiday (local · English) | Scope |
|---|---|---|
[Filtered to the question — the date, the range, the intersection; regional entries labeled with their regions]
[Long-weekend section when planning was the intent]
Source: Nager.Date · rerun: [exact curl]
[Coverage caveat when workplace/regional nuance is in play]
Quality Checks
- [ ] The specific question is answered before any list appears
- [ ] Regional (
global: false) holidays are labeled with their regions, never presented as national - [ ] Non-public
typesare filtered or labeled when "day off" is the question - [ ] Local names appear alongside English
- [ ] Multi-country answers show the intersection/union the question implied
Anti-Patterns
- [ ] Do not answer from memory — holiday rules change and lunar dates move; fetch or hand over the command
- [ ] Do not present a regional holiday as nationwide — the
globalflag exists to be read - [ ] Do not count observances as days off
- [ ] Do not dump 15 holidays when the question was one date
- [ ] Do not promise a workplace is closed — public holidays and company calendars are cousins, not twins
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
plugins/pm-live/skills/public-holidays/SKILL.md同一个仓库里的其他技能
同名技能的其他版本
有 3 个不同仓库或目录里都有叫 public-holidays 的技能。它们内容并不相同,别混用:
- mohitagw15856/pm-claude-skills — Look up public holidays for any country and year with zero API keys — the Nager.Date API v
- mohitagw15856/pm-claude-skills — Look up public holidays for any country and year with zero API keys — the Nager.Date API v